Runtime Wbz Decoding

From Custom Mario Kart
Revision as of 09:14, 26 December 2023 by Kazuki (talk | contribs) (Created page with "{| class="textbox float-right grid width:30%" |+ {{PAGENAME}} ! Author: | Kazuki |- ! Software type: | Code Extension |- ! Version: | v1.0 |- ! Date of latest version: | 2...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Runtime Wbz Decoding
Author: Kazuki
Software type: Code Extension
Version: v1.0
Date of latest version: 2023-12-26
Download: GitHub
Source code: GitHub

Overview

Runtime Wbz Decoding is a code extension of Mario Kart Wii created by Kazuki.

Decodes WBZ/WLZ to U8 when track data is loaded by game code. This reduces the capacity of most tracks by 30-40% (when using WLZ).

It was designed to reduce the time required to install distributions that distribute tracks as WBZ, such as Wiimms Mario Kart Fun,

and to reduce the capacity of huge distributions, such as Insane Kart Wii, by using WLZ.

It consists of custom REL and Gecko Code to load it.

As shown here, the auto-add library is required for WBZ/WLZ decoding. Therefore, Runtime Wbz Decoding uses auto-add.arc dumped by RevoKart Dumper.

Credits

Tutorial for using Runtime Wbz Decoding in your distribution

1.Convert SZS files

Convert SZS files in /Race/Course to WBZ or WLZ. And rename the extension from .wbz, .wlz to .szs.

Wiimms SZS Tools can be used to convert SZS to WBZ/WLZ.

wszst normalize track.szs --wbz --dest track.wbz
wszst normalize track.szs --wlz --dest track.wlz

2.Add Gecko Code to load REL

Add the following Gecko Code to your Distribution.

/rel/runtime_wbz_decoding_P.rel loader, PAL

/rel/runtime_wbz_decoding_E.rel loader, NTSC-U

/rel/runtime_wbz_decoding_J.rel loader, NTSC-J

/rel/runtime_wbz_decoding_K.rel loader, NTSC-K


3.Use Modified LE-CODE Loader (if your distribution uses LE-CODE)

Original LE-CODE Loader cannot be used with custom RELs.

If you are using LE-CODE Loader or --add-lecode option in Wiimms StaticR Tool, use Modified LE-CODE Loader instead.

Do not use --add-lecode option in Wiimms StaticR Tool.

If you are using the CT Distribution Loader, update to v1.1 or later.

4.Add custom REL file

Add custom RELs to /rel directory.

Riivolution xml example:

<file disc="/rel/runtime_wbz_decoding_P.rel" external="/{your distribution directory}/rel/runtime_wbz_decoding_P.rel" create="true" />
<file disc="/rel/runtime_wbz_decoding_E.rel" external="/{your distribution directory}/rel/runtime_wbz_decoding_E.rel" create="true" />
<file disc="/rel/runtime_wbz_decoding_J.rel" external="/{your distribution directory}/rel/runtime_wbz_decoding_J.rel" create="true" />
<file disc="/rel/runtime_wbz_decoding_K.rel" external="/{your distribution directory}/rel/runtime_wbz_decoding_K.rel" create="true" />

5.Add auto-add.arc dumped by RevoKart Dumper

ALL FILES IN auto-add.arc ARE NINTENDO ORIGINALS AND SHOULD NOT BE DISTRIBUTED!

Add auto-add.arc to /Race/Course directory.

For Riivolution patches, the following xml is highly desirable:

<file disc="/Race/Course/auto-add.arc" external="/rk_dumper/auto-add.arc" create="true" />

Version History

Version Date of release Information
v1.0 2023-12-26 First release