最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。
* u+ H. ?9 p; f3 H现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。 / ]2 M1 _4 x2 Q1 j' L* \$ v
: b, l. z2 s( Q5 f3 O l
---------------------------- / G$ S; Q2 G- `. p I+ L
工具更新1 9 Q$ Y6 w/ z0 u
----------------------------
' F& v7 J% [* d3 N" C+ kwell I have some good news. 0 b9 v7 W5 \/ x* p( A+ o/ f2 W' E
yesterday and today I have worked on the script parser and the results are so good that my beta version already works. " D7 @% [( T: a" s5 w) @$ I
" q, T3 t6 E% P
I have made it compatible with the BMS scripting language so people don't need to learn 1000 languages and then it's a good language. 8 C' t" r. P# F! \$ h. _* s$ {
obviously the BMS support has been enhanced so it's possible to use XOR, rot13, zlib/deflate, lzo, lzss plus various new operator in the "math" command (and, or, xor, complement, not, shift and modulus) and some other things like choosing the desired endianness. 8 b r- m0 z" B2 p0 I8 i
then the input BMS script no longer needs the semicolon ';' and the file number which are now optional. : q3 \9 L7 S3 {) v$ e3 J1 L
/ X; O" ~9 _. K' q7 ?# n
note that the BMS guide available on http://wiki.xentax.com/index.php/BMS doesn't report some additional fields which instead already exists like the GetCT, ComType and ReverseLong or some internals variables like EXTRCNT so I have tried to find and add also these ones.
$ j$ f- i8 z3 O# P) d! o9 p* y! T7 w' G" M0 d! \; H" H8 e% a9 t! W
about the new commands, the following is an example of BMS script for the game Outcry (you can call it outcry.bms or outcry.txt or as you want): / y5 Z2 W- W P: Y% T; L- y
0 N: t i" _' G& P' q6 J% g0 cCode:
% e2 q- I& d9 }idstring SBPK
# j% j, Q9 Q0 ]$ S0 z- Dget FILES long / r' k4 i G% [2 |/ R. A6 E/ W Z
6 R$ H2 Q$ ~, [: I6 E
savepos NAMES_OFFSET
' L; ]! j( S: S0 ]5 I) Kfor i = 1 to FILES * v* y8 R. h2 u# b1 P
get FNAMESZ long
4 y; `. z f4 p% e8 P% V# zgetdstring FNAME FNAMESZ
; Z' [4 \+ z# G; O$ }7 m6 H8 R% q8 Dget OFFSET long
' Z" S6 s, O4 U0 O5 E- wget SIZE long
" D# v" F! H3 }( b2 Knext i 8 x% I( X. N0 q1 d/ _, i
- N, }# l0 o" Y& S; isavepos FILES_OFFSET
) `( n, L, l& b9 [7 K, b K( a' tgoto NAMES_OFFSET 4 e4 F' b* e7 L+ w W
for i = 1 to FILES
# u6 o5 B8 q1 x2 xget FNAMESZ long + Y9 R2 A' G1 g* J$ w; v
getdstring FNAME FNAMESZ
, k1 C3 u) z( U k% s4 dget OFFSET long
$ ]5 K9 X. }* gget SIZE long 5 I+ o1 d" m& {. S: S, I
math OFFSET += FILES_OFFSET / Q2 s; D* O( K0 n( a5 h5 d
. i- ~0 `. t( r. R
filexor 0xcc 7 L# @. n) i. @5 n/ a
log FNAME OFFSET SIZE 0 0 6 h/ J1 o* J) d' i# o
filexor 0 8 p+ @8 t& y$ o) [" q- i! p
next i
9 f* Z# G8 p6 ~as visible it's files are XORed with the byte 0xcc. 8 [9 a: {. z# _9 m
; Y6 h& o# ~8 ^
now the link to the beta version:
- |- q, i; @7 i: }+ q$ e9 q5 u0 w" _% k; u5 D0 K: `
http://aluigi.org/papers/quickbms.zip + U& I; C2 H- T
! p3 i3 I7 ]5 C" J
obviously it needs to be tested more because 2 days are not enough for a project like this which is not so basic so anyone is invited to test it and suggest new features.
' _2 v0 v4 C/ l. z9 u1 B0 R
S. ?& ~( m( t5 aP.S.: the usage is very simple and the following are some examples:
0 k3 w0 Q7 ] _! g2 K+ plisting the files in the archive common.spk of outcry: ' o+ ^. O8 s) e
Code:
. n# i9 X6 L6 X. I8 W3 @quickbms -l outcry.bms c:\common.spk .
( Q$ B7 n$ V: I4 S/ g5 n m. ]7 ~8 Y1 y& T$ m% u3 t! r
extracting the files in c:\folder:
0 Q4 L. X! a+ x ^( `3 B) B3 }Code: . V7 r6 l8 k8 Q
quickbms outcry.bms c:\common.spk c:\folder / o' \* U; F0 v/ Z% |& \8 B
! Z. G$ c' x6 j/ C/ K& V
extracing or listing only the dds files:
0 `- W z* W; B- A$ D$ c9 qCode: % d9 F% }) a2 Z
quickbms -f "*.dds" outcry.bms c:\common.spk c:\folder ) i3 ~' P; {! d
# U8 d- r' W; `1 \. S
---------------------------- 5 l/ @- J$ q: R. h$ ~! `& m
工具更新2 6 C; d$ D: \' Q' y9 E
----------------------------
r1 q9 d7 r0 }. {% [if you know the size of the structure or where is located the particular value you are searching (for example some file formats have a 32bit number in the last 4 bytes which has the offset where are located the other file structures) you could use something like the following:
, h- u4 Q# w- e
7 R) h) t, I: @) TCode:get OFFSET asize
( e+ j: D; ?, L D$ u" R B" [math OFFSET -= 4 5 q9 [* \1 j6 B, ^5 n
goto OFFSET
' P$ W+ Z9 k+ Y: @# v: U8 hget OFFSET long 0 f$ A8 h: T+ F& w" W" ^4 o
goto OFFSET 4 {, c- Y. U, O4 S& G
..."asize" is not available in the BMS guide but is supported by both multiex and my tool, it contains the total size of the file. ' P) y; \9 b, F ?* D4 I
anyway tell me a file format which has the file name table at the end, it's good to make various exercises for testing the BMS language and where is possible to enhance it.
+ k) k, L! J v. V% y
9 |9 S0 D( R' }2 ^5 X3 }& j8 yoh and about the "repacking" question, no it will be not supported , C' N- ?# q* b4 D6 s4 Y8 J- K w
5 g7 J/ `1 l) f5 ~9 |/ d+ n
*EDIT*: updated version to 0.1.1 and attached 3 examples of BMS files which show different operations or different types for doing the same thing (7x7m.bms and 7x7m_special.bms) 1 ^6 y4 L! o, }' T: l
' P! Q y# S4 k- n
----------------------------------------------------- 0 q% ~# C, g4 d( _3 S
2009.4.17 更新
, ?/ a9 {+ X0 t9 l老外发布了最新的0.1.2 版。 ) \8 i9 B8 o8 R5 V ~6 Q% ~
----------------------------------------------------- 6 k9 ]! J1 @" T4 a! j
2009.4.18 更新
8 ~9 b, R U" W: q5 e6 y \老外发布了最新的0.1.2a 版。7 Z2 m: n! ?# A7 |: J" X2 P
----------------------------------------------------- 4 }* ]8 `' V3 N1 ]
2009.5.10 更新 , K5 o/ |7 p6 a. c4 a5 `
老外发布了最新的0.2.0 版。
7 y/ V& C% f5 A% } t" |3 n: Z----------------------------------------------------- - d% U" H# t5 Q! _, o
2009.5.10 更新
9 P) N+ f t5 U- Y9 O* {老外发布了最新的0.2.3a版。& t5 d9 F$ X. P5 o6 X
0 K `: l; y: W" ~; J( U3 K9 b; F1 ]9 w# X/ m+ {
说明:ND20在老版本打不开。 |