You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paths must not exceed 259 characters. Relative paths are supported.
12
15
The required directory tree for the *.bin file(s) will be created at the output directory.
13
16
You can set your SD card root directory as the output directory.
14
-
Parent title ID is only required if the input WAD is a DLC. A 16 character long hex string is expected.
17
+
18
+
Notes about DLC support:
19
+
* Parent title ID is only required if the input WAD is a DLC. A 16 character long hex string is expected.
20
+
* If "--nullkey" is set after the parent title ID, a null key will be used to encrypt DLC content data.
21
+
Some older games (like Rock Band 2) depend on this to properly load DLC data when launched via the Disc Channel.
22
+
23
+
For more information, please visit: https://github.com/DarkMatterCore/wad2bin.
15
24
```
16
25
17
26
Building instructions:
@@ -43,12 +52,20 @@ Guidelines:
43
52
* Both ticket and TMD for each converted WAD package must be installed on the target Wii console in order for this to work.
44
53
* For this matter, the program generates a bogus WAD package at the provided output directory, using the `<title_id>_bogus.wad` naming convention. It can be used with regular WAD Managers to install both ticket and TMD if needed.
45
54
* Bogus WAD packages don't have any encrypted content data, thus they're expected to return errors like `-1022` during installation with regular WAD Managers - this is expected behaviour, so don't panic.
46
-
* If you can't get your converted WAD package to work, try "uninstalling" the bogus WAD before installing it. It fixes the problem most of the time.
47
-
* If the WAD ticket wasn't issued for the target console, or if the WAD isn't legit (e.g. homebrew WAD), the IOS used by the System Menu must be patched to enable the [signing bug](https://wiibrew.org/wiki/Signing_bug) on it.
48
-
* Regular Wii consoles: use [Simple IOS Patcher](https://gbatemp.net/download/simple-ios-patcher.25749) to install a patched System Menu IOS (IOS60 for 4.0 and 4.1, IOS70 for 4.2 and IOS80 for 4.3).
49
-
* Wii U consoles (vWii): use [Patched IOS80 Installer for vWii](https://gbatemp.net/threads/patched-ios80-installer-for-vwii-allows-sd-menu-custom-channels.344882) to install a patched IOS80.
55
+
* If you can't get your converted WAD package to work, try uninstalling the bogus WAD before installing it (for real). This fixes the problem most of the time.
50
56
* Channel WADs get converted to `content.bin` files, while DLC WADs get converted to `<index>.bin` files.
51
57
* If a DLC WAD is provided, it doesn't matter if it's an uncomplete WAD with missing contents, a WAD with a tampered TMD that only references the packaged contents or a full WAD with all contents: all cases are supported by wad2bin. There's no need to provide any content indexes.
58
+
* DLCs can use a parent title ID that's different from the title ID from the game they belong if other games are capable of using them. That's why a parent title ID is required to convert DLCs.
59
+
* Converted DLC data can be encrypted using either a null key (used by older games) or the console-specific PRNG key (used by newer games, and also old games when launched with a cIOS).
60
+
* If the WAD ticket wasn't issued for the target console, or if the WAD isn't legit (e.g. homebrew WAD), a patched IOS must be installed and used. This varies depending on the converted WAD type:
61
+
***Channels:** the IOS used by the System Menu must be patched to enable the [signing bug](https://wiibrew.org/wiki/Signing_bug) on it:
62
+
* **Regular Wii consoles:** use [Simple IOS Patcher](https://gbatemp.net/download/simple-ios-patcher.25749) to install a patched System Menu IOS (IOS60 for 4.0 and 4.1, IOS70 for 4.2 and IOS80 for 4.3).
63
+
* **Wii U consoles (vWii):** use [Patched IOS80 Installer for vWii](https://gbatemp.net/threads/patched-ios80-installer-for-vwii-allows-sd-menu-custom-channels.344882) to install a patched IOS80.
64
+
***DLCs:** the game must be launched using a cIOS, or its required IOS version must be patched to enable the [signing bug](https://wiibrew.org/wiki/Signing_bug) on it. This greatly depends on:
65
+
***How old the game is:** if it enforces the usage of a null key when launched through the Disc Channel.
66
+
***The used launch method:** cIOS enforce the usage of the PRNG key, even on older games.
67
+
***Ticket/TMD signature validity:** if it's not valid, or if the ticket wasn't issued for the target console, a patched IOS or a cIOS will always be necessary.
68
+
* Because of all these reasons, it's difficult to establish a clear procedure that works for every single case. Further trial and error by the user is encouraged.
52
69
53
70
Supported DLCs:
54
71
--------------
@@ -65,7 +82,7 @@ The title ID from the parent game must be provided as an additional command line
65
82
*`00010005-735A45xx` (`sZEx`).
66
83
*`00010005-735A46xx` (`sZFx`).
67
84
68
-
* The Beatles Rock Band (`00010000-52394Axx`) (`R9Jx`):
85
+
* The Beatles: Rock Band (`00010000-52394Axx`) (`R9Jx`):
69
86
*`00010005-72394Axx` (`r9Jx`).
70
87
71
88
* Rock Band 3 (`00010000-535A42xx`) (`SZBx`):
@@ -133,6 +150,21 @@ wad2bin is licensed under GPLv3 or (at your option) any later version.
133
150
Changelog:
134
151
--------------
135
152
153
+
**v0.7:**
154
+
155
+
* Removed parent title ID generation for DLC WADs. This doesn't work properly with games that are capable of using DLCs from other games.
156
+
* The hardcoded DLC title ID list is still being used as a filter to know if any converted DLCs will work or not.
157
+
* Added support for encrypting converted DLC data with a null key. Fixes issues with older games launched through the Disc Channel, such as `Rock Band 2`.
158
+
* Please read the guidelines from the readme! Even if a null key is used, a patched IOS is still needed if the DLC ticket wasn't issued for the target console and you intend to launch the game through the Disc Channel.
159
+
* Added `The Beatles: Rock Band` DLC to the hardcoded DLC title ID list.
160
+
* Written content padding is now encrypted as well.
161
+
* Several fixes to the U8 archive parsing code.
162
+
* Fixed a silly `ECSDA` -> `ECDSA` typo.
163
+
* Reworked certificate chain, ticket and TMD handling.
164
+
* Implemented RSA signature verification in certificates, tickets and TMDs.
165
+
* Fixes a bug where the ticket would have been fakesigned even if it was perfectly valid.
166
+
* Useful info is now displayed at the end of the conversion process. Please read it.
167
+
136
168
**v0.6:**
137
169
138
170
* Added a hardcoded list with title IDs from DLCs that can be converted to the `<index>.bin` format. Any other DLCs will return an error. Thanks to this, it's no longer necessary to input a parent title ID.
@@ -104,12 +110,12 @@ int main(int argc, char **argv)
104
110
/* Check if the output directory string ends with a path separator. */
105
111
/* If so, remove it. */
106
112
u64path_len=strlen(argv[i+1]);
107
-
if (i== (ARG_COUNT-1) &&argv[i+1][path_len-1] ==*((u8*)OS_PATH_SEPARATOR)) paths[i][path_len-1] = (os_char_t)0;
113
+
if (i== (PATH_COUNT-1) &&argv[i+1][path_len-1] ==*((u8*)OS_PATH_SEPARATOR)) paths[i][path_len-1] = (os_char_t)0;
108
114
}
109
115
}
110
116
111
117
/* Check if the user provided a parent title ID. */
112
-
if (argc== (ARG_COUNT+2))
118
+
if (argc>= (PATH_COUNT+2))
113
119
{
114
120
/* Parse parent title ID. */
115
121
if (!keysParseHexKey((u8*)&parent_tid, NULL, argv[5], 8, false))
@@ -130,6 +136,9 @@ int main(int argc, char **argv)
130
136
ret=-6;
131
137
goto out;
132
138
}
139
+
140
+
/* Enable null key usage if needed. */
141
+
use_null_key= (argc== (PATH_COUNT+3));
133
142
}
134
143
135
144
/* Load keydata and device certificate. */
@@ -160,7 +169,7 @@ int main(int argc, char **argv)
160
169
if (tid_upper==TITLE_TYPE_DLC)
161
170
{
162
171
/* Check if a parent title ID was provided. */
163
-
if (argc!= (ARG_COUNT+2))
172
+
if (argc< (PATH_COUNT+2))
164
173
{
165
174
ERROR_MSG("Error: parent title ID not provided! This is required for DLC titles.\n");
166
175
ret=-9;
@@ -176,7 +185,7 @@ int main(int argc, char **argv)
176
185
}
177
186
178
187
/* Generate <index>.bin file(s). */
179
-
if (!binGenerateIndexedPackagesFromUnpackedInstallableWadPackage(paths[4], paths[3], tmd, parent_tid))
188
+
if (!binGenerateIndexedPackagesFromUnpackedInstallableWadPackage(paths[4], paths[3], tmd, parent_tid, use_null_key))
180
189
{
181
190
ret=-11;
182
191
goto out;
@@ -206,13 +215,33 @@ int main(int argc, char **argv)
206
215
207
216
if (tid_upper==TITLE_TYPE_DLC)
208
217
{
209
-
printf("In order to use the converted DLC package, you'll either need to launch the game using a cIOS (NeoGamma, USB Loader),\n");
210
-
printf("or install a patched IOS%u (if you wish to use the disc channel).\n\n", required_ios);
218
+
if (use_null_key)
219
+
{
220
+
printf("In order to use the converted DLC, you'll need to install a patched IOS%u and launch the game via the Disc Channel.\n", required_ios);
221
+
printf("The converted DLC won't work if you launch the game using a cIOS (e.g. NeoGamma, USB Loader).\n");
222
+
} else {
223
+
printf("In order to use the converted DLC, you'll need to launch the game using a cIOS (NeoGamma, USB Loader),\n");
224
+
printf("or install a patched IOS%u (if you wish to use the Disc Channel).\n", required_ios);
225
+
}
211
226
} else {
212
227
printf("You'll need to install a patched System Menu IOS in order to run this channel from the SD card menu.\n\n");
213
228
}
229
+
} else {
230
+
printf("Both ticket/TMD signatures are valid.\n");
231
+
232
+
if (tid_upper==TITLE_TYPE_DLC)
233
+
{
234
+
printf("This DLC should work right away on your console without having to launch the game using a cIOS, nor having to\n");
235
+
printf("install a patched IOS%u.\n", required_ios);
236
+
} else {
237
+
printf("This channel should work right away on your console without having to install a patched System Menu IOS.\n\n");
238
+
}
214
239
}
215
240
241
+
if (tid_upper==TITLE_TYPE_DLC) printf("If it doesn't work anyway, try converting the DLC %s \""NULL_KEY_ARG"\".\n\n", (use_null_key ? "without" : "with"));
242
+
243
+
printf("Remember to install the generated bogus WAD file! If it doesn't work, try uninstalling it first (for real).\n\n");
244
+
216
245
out:
217
246
if (ret<0&&ret!=-1) printf("Process failed!\n\n");
218
247
@@ -237,7 +266,7 @@ int main(int argc, char **argv)
237
266
/* Remove unpacked WAD directory. */
238
267
if (paths[4]) utilsRemoveDirectoryRecursively(paths[4]);
0 commit comments