Hacking Wiimms SZS Tools

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v1.07a.
(A command line tool set for Linux, Mac and Windows)

What's new:
  • I have implemented a new fiel format: WU8. Read this.
    .

Change Log:
Code:
szs v1.07a r4137 - 2012-10-19

- "wszst NORMALIZE --kcl ...": In the old versions, the KCL was patched in
place and the total size of the KCL was not changed. If the new KCL was
larger, parameters were changes in up to 5 iteration steps until the new
KCL was less or equal the old size. Now a complete new KCL is created with
the optimal settings and the size may shrink or grow.
If 'INPLACE' is added to the '--kcl list', the old behavior becomes active.

- wzszt CHECK: The logging of sub checks (KCL+KMP) is now better integrated
into the main log and there is now only one summary line for all.

- KCL creation tuned.

- The auto-add library holds now also unique files of folder 'posteffect'.
Try "wszst AUTOADD ./path/to/Race/Course/" to add all supported files.

- New archive format: WU8 (Wiimms U8)
WU8 is like U8, but the sub files are coded as patch for Nintendos original
files. This removes any code of Nintendo and a compressed WU8 (default) is
in general smaller than the related SZS. For encoding end decoding an
auto-add archive is needed (see http://szs.wiimm.de/doc/autoadd).

- wszst NORMALIZE/PATCH:
- Accept options --dest and --DEST for an alternative destination path.
- Accept options --u8 and --wu8 to define the new (W)U8-archive format.

- Object DB updated.


szs v1.06a r4110 - 2012-10-06

- Bug fix: "wkclt COPY" printed always a false syntax error after correct
finishing all copy jobs.

- Bug fixes for "wszst NORMALIZE":
- BRRES files will not touched now.
- Memory bug, if rebuilding the KCL.

- wszst CHECK will now make slot proposals with comments:
- Slots 3.1 and 7.1: Check usage of KMP objects 'sunDS' and 'pylon01'.
- Slot 4.2: Only the usage of at least one KMP object of 'kart_truck',
'car_body' or 'K_bomb_car' is done. An additonally MDL analysis is
missed, so the status is only "may run on slot 4.2".
- Slot 6.1: Test the existence of file 'ice.brres' and of KCL flag 0x70.
- Slot 6.2: Check usage of KMP object 'HeyhoShipGBA'.

- New command: wszst SLOTS: Prints the possible slots for a track file.
The analysis is the same as for "wszst CHECK" (see above). The command
prints either a positive or a negative slot list, whatever is shorter.


Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I published the first release v0.01a. Updates to previous beta:
  • Bug fix for "wstsz CREATE": Wrong calculation of parent directory link.
  • New option: wstsz CREATE --align: Overwrite the default aligment (32=0x20).
  • wstsz LIST: If --long is set three times debugging mode is enabled.
  • wstsz LIST: If listing a directory, then a virtual SZS file is created (like CREATE do it) and listed.
  • New command: wszst DIFF: Compare two sources (each SZS, U8 or directory) on file level and report mismatches for each sub file.
  • TESTS: I have replaced all files of Scene/UI and Race/Course and can playing it without any problems.
Download and more details: Wiimms SZS Tools - Custom Mario Kart
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.03a.

I have implemented all my needs. Both tools (wszst+wbmgt) are complete now: My main goal was to to replace all track names of Mario Kart in all message files for all languages. For PAL these are 50 SZS files, that must be extracted, modified and created. On my Linux development computer this needs about 4 seconds.

* features
* download
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.05a.

I have fixed some minor bugs and improved many little things:

Code:
 - Code view & fine tuning (many little things...)

- wszst NORMALIZE: Bug fixed if source does not contain a "." directory.

- wszst CREATE+NORMALIZE: The files are ordered like Nintendo does it.

- New command: wszst SHA1: calculate and print the SHA1 checksum of
ÂÂ the decompressed data of all source files.

- wszst+wbmgt DIFF: If option --dest is set then all sources are compared
ÂÂ with the destination.

- New option: wszst --pdir (`point directory'): Decides if a base directory
ÂÂ named "." should be created. Modes are: REMOVE, AUTO, FORCE.

- New option: --preserve: If set, mtime and atime of the source(s) are used
ÂÂ to set the destination time stamps.

- wbmgt: If creating a text BMG file option --ho-header (or -H) suppresses
ÂÂ the output of the syntax information section.

- wbmgt: If creating a text BMG file the message IDs for tracks, battle
ÂÂ tracks and chat messages will be replaced by 'Txx', 'Uxx' and 'Mxx'.
ÂÂ This feature is disabled if option ---long is set.

* Features
* Download
* Custom Mario Kart Wiiki
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.06a.

What's new:
  • Tool wszst can now create BRRES files from scratch. All files of a directory structure are included.
  • Tool wszst can now extract and create SZS, U8 and BRRES files recursivley. This makes access to any component very easy.
  • Tool wszst is able to decode or encode BMG files while extracting or creating archives.


Change Log:
Code:
szs v0.06a r2540 - 2011-04-27

- If extracting a SZS, U8 or BRRES archive a file named 'wszst-setup.txt' is
ÂÂ created. It contains some infos for a following creation.

- New option --ignore-setup: Ignore setup file 'wszst-setup.txt'.

- Option --pdir renamed to --pt-dir. --pdir is still allowed.

- wszst CREATE: Can now create a BRRES file as copy of a directory structure.

- wbmgt: If creating text BMG files, than unicode escapes "\z{801,hexnum}"
ÂÂ are written as \u{hexnum}. v0.05a can already scan such unicode escapes.

- wbmgt: new patch mode "print": create a new text using %s-escapes (like
ÂÂ print functions) to insert the old one.

- "wszst EXTRACT" can extract recursive and can decode BMG files on the fly.
ÂÂ This is controlled by the options --recurse, --decode and --all. All needed
ÂÂ information for recreation is stored in the setup file 'wszst-setup.txt'.

- "wszst CREATE" creates a recursive directory structure created by EXTRACT
ÂÂ using 'wszst-setup.txt' as script. Files will be encoded again.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.09a.

What's new:
  • New tool: wstrt: Wiimms StaticR Tool: manipulate StaticR files of MKW.
  • 2 new option for all 3 tools: --tracks and --arenas: Define a new track and/or arena order.

Change Log:
Code:
szs v0.08a r2617 - 2011-05-12

- Improved support for BRRES sub file versions (more string pointers).

- wszst EXTRACT --raw: Extract BRRES sub file in raw mode and do not adjust
ÂÂ string pointers and other offsets.


szs v0.09a r2636 - 2011-05-17
- New tool: wstrt: Wiimms StaticR Tool: manipulate StaticR files of MKW.

ÂÂÂÂ- It can analyze StaticR files and detects CTGP 4.4. patches and
ÂÂÂÂÂÂmodifications of track and arena orders.

ÂÂÂÂ- It can patch StaticR files and modifies the track and arena order.
ÂÂÂÂÂÂSo it is possible to move tracks with special features (like snow
ÂÂÂÂÂÂor fog) to other slots.

ÂÂÂÂ- Commands TRACKS and ARENAS show details about tracks and arenas.
ÂÂÂÂÂÂThe order may be in StaticR related order.

ÂÂÂÂ- Command FILES shows the track and sound file names of all tracks and
ÂÂÂÂÂÂarenas in machine readable format (not vertically formatted, one space
ÂÂÂÂÂÂto separate columns). The order may be in 'StaticR' related order.

ÂÂ IMPORTANT: wstrt is EXPERIMENTAL!

- New option: --tracks=list: This option allow to define a new track order
ÂÂ for Mario Kart Wii. Tool wstrt uses this option for patching the track
ÂÂ order. Tools wszst and wbmgt use this to define the relation between Txx
ÂÂ and real message IDs.

- New option: --arenas=list: Does the same for arenas as --tracks for tracks.


Known bugs:
ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.10a.

What's new:
  • wstrt (Wiimms StaticR Tool): support of JAP and KOREA version of StaticR files.

Change Log:
Code:
szs v0.09a r2636 - 2011-05-17
- New tool: wstrt: Wiimms StaticR Tool: manipulate StaticR files of MKW.

ÂÂÂÂ- It can analyze StaticR files and detects CTGP 4.4. patches and
ÂÂÂÂÂÂmodifications of track and arena orders.

ÂÂÂÂ- It can patch StaticR files and modifies the track and arena order.
ÂÂÂÂÂÂSo it is possible to move tracks with special features (like snow
ÂÂÂÂÂÂor fog) to other slots.

ÂÂÂÂ- Commands TRACKS and ARENAS show details about tracks and arenas.
ÂÂÂÂÂÂThe order may be in StaticR related order.

ÂÂÂÂ- Command FILES shows the track and sound file names of all tracks and
ÂÂÂÂÂÂarenas in machine readable format (not vertically formatted, one space
ÂÂÂÂÂÂto separate columns). The order may be in 'StaticR' related order.

ÂÂ IMPORTANT: wstrt is EXPERIMENTAL!

- New option: --tracks=list: This option allow to define a new track order
ÂÂ for Mario Kart Wii. Tool wstrt uses this option for patching the track
ÂÂ order. Tools wszst and wbmgt use this to define the relation between Txx
ÂÂ and real message IDs.

- New option: --arenas=list: Does the same for arenas as --tracks for tracks.


szs v0.10a r2651 - 2011-05-21

- wstrt: Support for NTSC/JAP and KOREA version of StaticR.rel.

- wstrt: new command: FIND: Find tracks and arenas by name.


Known bugs:
ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.11a.

What's new:
  • Tool wszst can now list and extract BREFF and BREFT files.

Change Log:
Code:
szs v0.10a r2651 - 2011-05-21

- wstrt: Support for NTSC/JAP and KOREA version of StaticR.rel.

- wstrt: new command: FIND: Find tracks and arenas by name.


szs v0.11a r2670 - 2011-06-04

- New option: --single-line (-1): No continuation lines for BMG text output.

- Support for BREFF and BREFT files: Listing and extraction, but not creation:

ÂÂÂÂ- wszst LIST: List also BREFF and BREFT files inlcuding recursive lists.

ÂÂÂÂ- wszst EXTRACT: Extract also BREFF and BRRES files. Recursive extraction
ÂÂÂÂÂÂof theses file types is implemented but disabled because of not
ÂÂÂÂÂÂimplemented creation support.


Known bugs:

ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

ÂÂ- Creating BREFF and BREFT file is not implemented yet.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.12a.

What's new:
  • Tool wszst can now list, extract and create BREFF and BREFT files.

Change Log:
Code:
szs v0.11a r2670 - 2011-06-04

- New option: --single-line (-1): No continuation lines for BMG text output.

- Support for BREFF and BREFT files: Listing and extraction, but not creation:

ÂÂÂÂ- wszst LIST: List also BREFF and BREFT files inlcuding recursive lists.

ÂÂÂÂ- wszst EXTRACT: Extract also BREFF and BRRES files. Recursive extraction
ÂÂÂÂÂÂof theses file types is implemented but disabled because of not
ÂÂÂÂÂÂimplemented creation support.


szs v0.12a r2693 - 2011-06-16

- Bug fix for Windows install script: Remove duplicate SZS entries from PATH.

- wszst CREATE: Create BREFF and BREFT files.


Known bugs:

ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

Links:
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
have you tried your tools on the bmg files in the system menu? these seem to used for the same purpose - storing text that is displayed on the screen. i gave it a shot and your tool said that it was an invalid file. IDK if the file format is changed or maybe i just didnt do it right.
 

techboy

Well-Known Member
Member
Joined
Mar 15, 2009
Messages
1,720
Trophies
0
Age
31
Location
Pennsylvania
Website
Visit site
XP
306
Country
United States
giantpune said:
have you tried your tools on the bmg files in the system menu? these seem to used for the same purpose - storing text that is displayed on the screen. i gave it a shot and your tool said that it was an invalid file. IDK if the file format is changed or maybe i just didnt do it right.
I tried this as well a little while back when I was considering helping someone translate the SM. It appears that it doesn't work with the SM's BMG files. Chadsoft's SZS Modifier works with the SM BMGs, so it'd be really nice to see this app support them as well.
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.13a.
(A command line toolset for Linux, Mac and Windows)

What's new:
  • Tool wszst can now export images to PNG files while extracting. Try "wszst extract --all MY.szs" and traverse the new directory "MY.d".
  • If tool wszst creates an archive, to looks for new PNG files and convert them back to the internal file and image format.
  • The new tool wimgt list files and geometry data.
  • The new tool wimgt converts images between file and image formats.
  • Supported file formats: BREFT subfiles, TPL, TEX0 and PNG.
  • Supported image formats: I4, I8, IA4, IA8, RGB565, RGB5A3, RGBA32, C4, C8, C14X2, CMPR and PNG.
I'll write a guide how to convert images in the next days.

Change Log:
Code:
szs v0.13a r2840 - 2011-07-09

- Bug fix for tool wszst: Tool chrashed when creating BRRES files with empty
ÂÂ sub directories.

- wszst: Export of internal images (BREFT subfiles, TPL, TEX0) to PNG files
ÂÂ is done while extracting archives if decoding is enabled. Supported image
ÂÂ formats: I4, I8, IA4, IA8, RGB565, RGB5A3, RGBA32, C4, C8, C14X2 and CMPR.

- New tool: wimgt = Wiimms Image Tool : Convert and manage images files.
ÂÂ Supported file types: BREFT subfiles, TPL, TEX0 and PNG.
ÂÂÂÂ- wimgt LIST:ÂÂÂÂList images files and print types and geometry data.
ÂÂÂÂ- wimgt DECODE:ÂÂExport an internal image to a PNG file.
ÂÂÂÂ- wimgt ENCODE:ÂÂImport PNG images and store them in internal formats.
ÂÂÂÂ- wimgt CONVERT: Convert formats (file and image format).

- All tools: new command FILETYPE (=FT): Scan the header of the entered files
ÂÂ and print file type and path for each file as list.


Known bugs:

ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

ÂÂ- Creating TPL images files with more than 1 image is not supported yet.
ÂÂÂÂOnly file 'savebanner.tpl' is known to have 2 images.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.15a.
(A command line toolset for Linux, Mac and Windows)

What's new:
  • The new tool wkmpt can decode (convert to text) and encode (convert to binary) KMP files.
  • Command wkmpt DECODE converts each source file into text mode. These text files can be edited with any text editor and it's complete power. Also script or other text tools may manipulated theses text files.
  • Command wkmpt ENCODE converts each source file into raw mode. Indexing and grouping are done automatically. Some other automatic calculations can be enabled by switches within the text files.
  • Tool wszst can now decodes KMP files while extracting. Try wszst extract --decode MY.szs and traverse the new directory "MY.d".
  • If tool wszst creates an archive, to looks for new KMP text files and convert them back to the internal KMP file format.

Change Log:
Code:
szs v0.15a r2917 - 2011-08-07

- New tool: wkmpt: Wiimms KMP Tool

ÂÂ - wkmpt DECODE: Decode a binary KMP file and store the results
ÂÂÂÂ as user friendly, but machine readable text file.

ÂÂ - wkmpt ENCODE: Encode a text KMP file and store the results binary.
ÂÂÂÂ Indexing and grouping and some other stuff are done automatically. 

- wszst EXTRACT: KMP files are decoded automatically.

- wszst CREATE: Encode KMP files automatically if changed.

- New image options for wszst: --transform= --encode-img


Known bugs:

ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

ÂÂ- Creating TPL images files with more than 1 image is not supported yet.
ÂÂÂÂOnly file 'savebanner.tpl' is known to have 2 images.

Links:
 

Wiimm

Developer
OP
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
I have released Wiimms SZS Tools v0.17a.
(A command line toolset for Linux, Mac and Windows)

What's new:
  • The new tool wkmpt can decode (convert to text) and encode (convert to binary) KMP files.
  • Command wkmpt DECODE converts each source file into text mode. These text files can be edited with any text editor and it's complete power. Also script or other text tools may manipulated theses text files.
  • Command wkmpt ENCODE converts each source file into raw mode. Indexing and grouping are done automatically. Some other automatic calculations can be enabled by switches within the text files.
  • Tool wszst can now decodes KMP files while extracting. Try wszst extract --decode MY.szs and traverse the new directory "MY.d".
  • If tool wszst creates an archive, to looks for new KMP text files and convert them back to the internal KMP file format.
    .
  • Since this release, internal links to other sections (CAME+GOBJ to POTI, CKPT to JGPT) can use names instead of numbers. This makes list modifications (inserting, removing, reordering) much easier. The text export uses automatically generic names as predefinition.

Change Log:
Code:
szs v0.17a r2941 - 2011-08-16

- Scan KMP text: Correct line numbers in error messages.

- KMP: [CAME], [GOBJ] and [CHKT] entries can use names to point to the route
ÂÂ or respawn entries into the [POST] or [JGPT] sections. This makes list
ÂÂ modifications (inserting, removing, reordering) much easier.

- KMP: Parameter '@AUTO-ID=1' enables automatic setting of ID values.

- KMP text export:
ÂÂÂÂ - Improved and more detailed documentation.
ÂÂÂÂ - The sections are now sorted alphabetically.
ÂÂÂÂ - Links into other section uses generic names instead of index numbers.


Known bugs:

ÂÂ- If creating a BRRES the internal name of the sub file is not set to
ÂÂÂÂthe filename. This could be problematic if a sub file was renamed.

ÂÂ- Creating TPL images files with more than 1 image is not supported yet.
ÂÂÂÂOnly file 'savebanner.tpl' is known to have 2 images.

Links:
 

ice1006

Active Member
Newcomer
Joined
Sep 8, 2009
Messages
30
Trophies
0
XP
55
Country
United States
Hi Wimm, I found a bug in Wiimms tools(wit.exe), and report it in the wiimms tools topic, could you fix it ?

Sorry, It seems that you haven't review that topic for a long time, so I have to contact you in this topic. It's really strange, but very important for me, I really hope you could help me to slove this problem, thanks.

http://gbatemp.net/index.php?showtopic=182...&start=1200
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: 10 tabs open on chrome and no slow downs suck it low ram ple bs lol