wut  v1.5.0
Wii U Toolchain
title.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wut.h>
4 #include <nn/acp/result.h>
5 #include <nn/acp/device.h>
6 #include <coreinit/mcp.h>
7 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 typedef uint64_t ACPTitleId;
21 typedef struct ACPMetaXml ACPMetaXml;
22 
23 struct WUT_PACKED ACPMetaXml {
24  uint64_t title_id;
25  uint64_t boss_id;
26  uint64_t os_version;
27  uint64_t app_size;
28  uint64_t common_save_size;
30  uint64_t common_boss_size;
33  uint32_t version;
34  char product_code[32];
35  char content_platform[32];
36  char company_code[8];
37  char mastering_date[32];
38  uint32_t logo_type;
39  uint32_t app_launch_type;
40  uint32_t invisible_flag;
41  uint32_t no_managed_flag;
42  uint32_t no_event_log;
43  uint32_t no_icon_database;
44  uint32_t launching_flag;
45  uint32_t install_flag;
46  uint32_t closing_msg;
47  uint32_t title_version;
48  uint32_t group_id;
49  uint32_t save_no_rollback;
50  uint32_t bg_daemon_enable;
51  uint32_t join_game_id;
52  uint32_t olv_accesskey;
53  uint32_t wood_tin;
54  uint32_t e_manual;
55  uint32_t e_manual_version;
56  uint32_t region;
57  uint32_t pc_cero;
58  uint32_t pc_esrb;
59  uint32_t pc_bbfc;
60  uint32_t pc_usk;
61  uint32_t pc_pegi_gen;
62  uint32_t pc_pegi_fin;
63  uint32_t pc_pegi_prt;
64  uint32_t pc_pegi_bbfc;
65  uint32_t pc_cob;
66  uint32_t pc_grb;
67  uint32_t pc_cgsrr;
68  uint32_t pc_oflc;
69  uint32_t pc_reserved0;
70  uint32_t pc_reserved1;
71  uint32_t pc_reserved2;
72  uint32_t pc_reserved3;
73  uint32_t ext_dev_nunchaku;
74  uint32_t ext_dev_classic;
75  uint32_t ext_dev_urcc;
76  uint32_t ext_dev_board;
78  uint32_t ext_dev_etc;
79  char ext_dev_etc_name[512];
80  uint32_t eula_version;
81  uint32_t drc_use;
82  uint32_t network_use;
84  uint32_t direct_boot;
85  uint32_t reserved_flag0;
86  uint32_t reserved_flag1;
87  uint32_t reserved_flag2;
88  uint32_t reserved_flag3;
89  uint32_t reserved_flag4;
90  uint32_t reserved_flag5;
91  uint32_t reserved_flag6;
92  uint32_t reserved_flag7;
93  char longname_ja[512];
94  char longname_en[512];
95  char longname_fr[512];
96  char longname_de[512];
97  char longname_it[512];
98  char longname_es[512];
99  char longname_zhs[512];
100  char longname_ko[512];
101  char longname_nl[512];
102  char longname_pt[512];
103  char longname_ru[512];
104  char longname_zht[512];
105  char shortname_ja[256];
106  char shortname_en[256];
107  char shortname_fr[256];
108  char shortname_de[256];
109  char shortname_it[256];
110  char shortname_es[256];
111  char shortname_zhs[256];
112  char shortname_ko[256];
113  char shortname_nl[256];
114  char shortname_pt[256];
115  char shortname_ru[256];
116  char shortname_zht[256];
117  char publisher_ja[256];
118  char publisher_en[256];
119  char publisher_fr[256];
120  char publisher_de[256];
121  char publisher_it[256];
122  char publisher_es[256];
123  char publisher_zhs[256];
124  char publisher_ko[256];
125  char publisher_nl[256];
126  char publisher_pt[256];
127  char publisher_ru[256];
128  char publisher_zht[256];
129  uint32_t add_on_unique_id[32];
130  WUT_UNKNOWN_BYTES(52);
131 };
132 WUT_CHECK_OFFSET(ACPMetaXml, 0x00, title_id);
133 WUT_CHECK_OFFSET(ACPMetaXml, 0x08, boss_id);
134 WUT_CHECK_OFFSET(ACPMetaXml, 0x10, os_version);
135 WUT_CHECK_OFFSET(ACPMetaXml, 0x18, app_size);
136 WUT_CHECK_OFFSET(ACPMetaXml, 0x20, common_save_size);
137 WUT_CHECK_OFFSET(ACPMetaXml, 0x28, account_save_size);
138 WUT_CHECK_OFFSET(ACPMetaXml, 0x30, common_boss_size);
139 WUT_CHECK_OFFSET(ACPMetaXml, 0x38, account_boss_size);
140 WUT_CHECK_OFFSET(ACPMetaXml, 0x40, join_game_mode_mask);
141 WUT_CHECK_OFFSET(ACPMetaXml, 0x48, version);
142 WUT_CHECK_OFFSET(ACPMetaXml, 0x4C, product_code);
143 WUT_CHECK_OFFSET(ACPMetaXml, 0x6C, content_platform);
144 WUT_CHECK_OFFSET(ACPMetaXml, 0x8C, company_code);
145 WUT_CHECK_OFFSET(ACPMetaXml, 0x94, mastering_date);
146 WUT_CHECK_OFFSET(ACPMetaXml, 0xB4, logo_type);
147 WUT_CHECK_OFFSET(ACPMetaXml, 0xB8, app_launch_type);
148 WUT_CHECK_OFFSET(ACPMetaXml, 0xBC, invisible_flag);
149 WUT_CHECK_OFFSET(ACPMetaXml, 0xC0, no_managed_flag);
150 WUT_CHECK_OFFSET(ACPMetaXml, 0xC4, no_event_log);
151 WUT_CHECK_OFFSET(ACPMetaXml, 0xC8, no_icon_database);
152 WUT_CHECK_OFFSET(ACPMetaXml, 0xCC, launching_flag);
153 WUT_CHECK_OFFSET(ACPMetaXml, 0xD0, install_flag);
154 WUT_CHECK_OFFSET(ACPMetaXml, 0xD4, closing_msg);
155 WUT_CHECK_OFFSET(ACPMetaXml, 0xD8, title_version);
156 WUT_CHECK_OFFSET(ACPMetaXml, 0xDC, group_id);
157 WUT_CHECK_OFFSET(ACPMetaXml, 0xE0, save_no_rollback);
158 WUT_CHECK_OFFSET(ACPMetaXml, 0xE4, bg_daemon_enable);
159 WUT_CHECK_OFFSET(ACPMetaXml, 0xE8, join_game_id);
160 WUT_CHECK_OFFSET(ACPMetaXml, 0xEC, olv_accesskey);
161 WUT_CHECK_OFFSET(ACPMetaXml, 0xF0, wood_tin);
162 WUT_CHECK_OFFSET(ACPMetaXml, 0xF4, e_manual);
163 WUT_CHECK_OFFSET(ACPMetaXml, 0xF8, e_manual_version);
164 WUT_CHECK_OFFSET(ACPMetaXml, 0xFC, region);
165 WUT_CHECK_OFFSET(ACPMetaXml, 0x100, pc_cero);
166 WUT_CHECK_OFFSET(ACPMetaXml, 0x104, pc_esrb);
167 WUT_CHECK_OFFSET(ACPMetaXml, 0x108, pc_bbfc);
168 WUT_CHECK_OFFSET(ACPMetaXml, 0x10C, pc_usk);
169 WUT_CHECK_OFFSET(ACPMetaXml, 0x110, pc_pegi_gen);
170 WUT_CHECK_OFFSET(ACPMetaXml, 0x114, pc_pegi_fin);
171 WUT_CHECK_OFFSET(ACPMetaXml, 0x118, pc_pegi_prt);
172 WUT_CHECK_OFFSET(ACPMetaXml, 0x11C, pc_pegi_bbfc);
173 WUT_CHECK_OFFSET(ACPMetaXml, 0x120, pc_cob);
174 WUT_CHECK_OFFSET(ACPMetaXml, 0x124, pc_grb);
175 WUT_CHECK_OFFSET(ACPMetaXml, 0x128, pc_cgsrr);
176 WUT_CHECK_OFFSET(ACPMetaXml, 0x12C, pc_oflc);
177 WUT_CHECK_OFFSET(ACPMetaXml, 0x130, pc_reserved0);
178 WUT_CHECK_OFFSET(ACPMetaXml, 0x134, pc_reserved1);
179 WUT_CHECK_OFFSET(ACPMetaXml, 0x138, pc_reserved2);
180 WUT_CHECK_OFFSET(ACPMetaXml, 0x13C, pc_reserved3);
181 WUT_CHECK_OFFSET(ACPMetaXml, 0x140, ext_dev_nunchaku);
182 WUT_CHECK_OFFSET(ACPMetaXml, 0x144, ext_dev_classic);
183 WUT_CHECK_OFFSET(ACPMetaXml, 0x148, ext_dev_urcc);
184 WUT_CHECK_OFFSET(ACPMetaXml, 0x14C, ext_dev_board);
185 WUT_CHECK_OFFSET(ACPMetaXml, 0x150, ext_dev_usb_keyboard);
186 WUT_CHECK_OFFSET(ACPMetaXml, 0x154, ext_dev_etc);
187 WUT_CHECK_OFFSET(ACPMetaXml, 0x158, ext_dev_etc_name);
188 WUT_CHECK_OFFSET(ACPMetaXml, 0x358, eula_version);
189 WUT_CHECK_OFFSET(ACPMetaXml, 0x35C, drc_use);
190 WUT_CHECK_OFFSET(ACPMetaXml, 0x360, network_use);
191 WUT_CHECK_OFFSET(ACPMetaXml, 0x364, online_account_use);
192 WUT_CHECK_OFFSET(ACPMetaXml, 0x368, direct_boot);
193 WUT_CHECK_OFFSET(ACPMetaXml, 0x36C, reserved_flag0);
194 WUT_CHECK_OFFSET(ACPMetaXml, 0x370, reserved_flag1);
195 WUT_CHECK_OFFSET(ACPMetaXml, 0x374, reserved_flag2);
196 WUT_CHECK_OFFSET(ACPMetaXml, 0x378, reserved_flag3);
197 WUT_CHECK_OFFSET(ACPMetaXml, 0x37C, reserved_flag4);
198 WUT_CHECK_OFFSET(ACPMetaXml, 0x380, reserved_flag5);
199 WUT_CHECK_OFFSET(ACPMetaXml, 0x384, reserved_flag6);
200 WUT_CHECK_OFFSET(ACPMetaXml, 0x388, reserved_flag7);
201 WUT_CHECK_OFFSET(ACPMetaXml, 0x38C, longname_ja);
202 WUT_CHECK_OFFSET(ACPMetaXml, 0x58C, longname_en);
203 WUT_CHECK_OFFSET(ACPMetaXml, 0x78C, longname_fr);
204 WUT_CHECK_OFFSET(ACPMetaXml, 0x98C, longname_de);
205 WUT_CHECK_OFFSET(ACPMetaXml, 0xB8C, longname_it);
206 WUT_CHECK_OFFSET(ACPMetaXml, 0xD8C, longname_es);
207 WUT_CHECK_OFFSET(ACPMetaXml, 0xF8C, longname_zhs);
208 WUT_CHECK_OFFSET(ACPMetaXml, 0x118C, longname_ko);
209 WUT_CHECK_OFFSET(ACPMetaXml, 0x138C, longname_nl);
210 WUT_CHECK_OFFSET(ACPMetaXml, 0x158C, longname_pt);
211 WUT_CHECK_OFFSET(ACPMetaXml, 0x178C, longname_ru);
212 WUT_CHECK_OFFSET(ACPMetaXml, 0x198C, longname_zht);
213 WUT_CHECK_OFFSET(ACPMetaXml, 0x1B8C, shortname_ja);
214 WUT_CHECK_OFFSET(ACPMetaXml, 0x1C8C, shortname_en);
215 WUT_CHECK_OFFSET(ACPMetaXml, 0x1D8C, shortname_fr);
216 WUT_CHECK_OFFSET(ACPMetaXml, 0x1E8C, shortname_de);
217 WUT_CHECK_OFFSET(ACPMetaXml, 0x1F8C, shortname_it);
218 WUT_CHECK_OFFSET(ACPMetaXml, 0x208C, shortname_es);
219 WUT_CHECK_OFFSET(ACPMetaXml, 0x218C, shortname_zhs);
220 WUT_CHECK_OFFSET(ACPMetaXml, 0x228C, shortname_ko);
221 WUT_CHECK_OFFSET(ACPMetaXml, 0x238C, shortname_nl);
222 WUT_CHECK_OFFSET(ACPMetaXml, 0x248C, shortname_pt);
223 WUT_CHECK_OFFSET(ACPMetaXml, 0x258C, shortname_ru);
224 WUT_CHECK_OFFSET(ACPMetaXml, 0x268C, shortname_zht);
225 WUT_CHECK_OFFSET(ACPMetaXml, 0x278C, publisher_ja);
226 WUT_CHECK_OFFSET(ACPMetaXml, 0x288C, publisher_en);
227 WUT_CHECK_OFFSET(ACPMetaXml, 0x298C, publisher_fr);
228 WUT_CHECK_OFFSET(ACPMetaXml, 0x2A8C, publisher_de);
229 WUT_CHECK_OFFSET(ACPMetaXml, 0x2B8C, publisher_it);
230 WUT_CHECK_OFFSET(ACPMetaXml, 0x2C8C, publisher_es);
231 WUT_CHECK_OFFSET(ACPMetaXml, 0x2D8C, publisher_zhs);
232 WUT_CHECK_OFFSET(ACPMetaXml, 0x2E8C, publisher_ko);
233 WUT_CHECK_OFFSET(ACPMetaXml, 0x2F8C, publisher_nl);
234 WUT_CHECK_OFFSET(ACPMetaXml, 0x308C, publisher_pt);
235 WUT_CHECK_OFFSET(ACPMetaXml, 0x318C, publisher_ru);
236 WUT_CHECK_OFFSET(ACPMetaXml, 0x328C, publisher_zht);
237 WUT_CHECK_OFFSET(ACPMetaXml, 0x338C, add_on_unique_id);
238 WUT_CHECK_SIZE(ACPMetaXml,0x3440);
239 
240 ACPResult
242 
243 ACPResult
245 
252 ACPResult
254  ACPMetaXml *metaXml);
255 
263 static inline ACPResult
265  ACPMetaXml *metaXml) {
266  if ((uintptr_t) metaXml & 0x3F) {
268  }
269  return RPLWRAP(ACPGetTitleMetaXml)(titleId, metaXml);
270 }
271 
272 ACPResult
274  char* directory,
275  size_t directoryLen,
276  ACPDeviceType deviceType);
277 
278 #ifdef __cplusplus
279 }
280 #endif
281 
int32_t ACPDeviceType
Definition: device.h:15
ACPResult
Definition: result.h:11
@ ACP_RESULT_INVALID_PARAMETER
Definition: result.h:15
uint64_t boss_id
Definition: title.h:25
uint64_t title_id
Definition: title.h:24
uint32_t eula_version
Definition: title.h:80
uint32_t drc_use
Definition: title.h:81
uint32_t pc_grb
Definition: title.h:66
uint32_t pc_reserved3
Definition: title.h:72
uint32_t ext_dev_usb_keyboard
Definition: title.h:77
uint32_t wood_tin
Definition: title.h:53
uint32_t pc_pegi_gen
Definition: title.h:61
uint32_t ext_dev_urcc
Definition: title.h:75
uint32_t pc_reserved2
Definition: title.h:71
uint32_t closing_msg
Definition: title.h:46
uint64_t app_size
Definition: title.h:27
uint32_t logo_type
Definition: title.h:38
uint32_t pc_pegi_fin
Definition: title.h:62
uint32_t ext_dev_classic
Definition: title.h:74
uint32_t install_flag
Definition: title.h:45
uint32_t pc_bbfc
Definition: title.h:59
uint32_t join_game_id
Definition: title.h:51
uint32_t no_event_log
Definition: title.h:42
uint32_t ext_dev_etc
Definition: title.h:78
uint32_t no_managed_flag
Definition: title.h:41
uint32_t pc_cgsrr
Definition: title.h:67
uint32_t online_account_use
Definition: title.h:83
uint32_t ext_dev_nunchaku
Definition: title.h:73
uint32_t reserved_flag7
Definition: title.h:92
uint32_t pc_usk
Definition: title.h:60
uint32_t pc_oflc
Definition: title.h:68
uint32_t no_icon_database
Definition: title.h:43
uint32_t pc_cob
Definition: title.h:65
uint32_t group_id
Definition: title.h:48
uint64_t os_version
Definition: title.h:26
uint32_t ext_dev_board
Definition: title.h:76
uint32_t direct_boot
Definition: title.h:84
uint32_t network_use
Definition: title.h:82
uint64_t account_boss_size
Definition: title.h:31
uint32_t save_no_rollback
Definition: title.h:49
uint32_t pc_esrb
Definition: title.h:58
uint32_t launching_flag
Definition: title.h:44
uint32_t pc_reserved0
Definition: title.h:69
uint32_t pc_pegi_bbfc
Definition: title.h:64
uint64_t join_game_mode_mask
Definition: title.h:32
uint32_t pc_cero
Definition: title.h:57
uint32_t reserved_flag3
Definition: title.h:88
uint64_t common_save_size
Definition: title.h:28
uint32_t pc_pegi_prt
Definition: title.h:63
uint32_t reserved_flag2
Definition: title.h:87
uint32_t version
Definition: title.h:33
uint32_t e_manual
Definition: title.h:54
uint64_t account_save_size
Definition: title.h:29
uint32_t olv_accesskey
Definition: title.h:52
uint32_t bg_daemon_enable
Definition: title.h:50
uint32_t app_launch_type
Definition: title.h:39
uint32_t reserved_flag6
Definition: title.h:91
uint32_t e_manual_version
Definition: title.h:55
uint32_t invisible_flag
Definition: title.h:40
uint64_t common_boss_size
Definition: title.h:30
uint32_t reserved_flag5
Definition: title.h:90
uint32_t reserved_flag0
Definition: title.h:85
uint32_t reserved_flag1
Definition: title.h:86
uint32_t region
Definition: title.h:56
uint32_t reserved_flag4
Definition: title.h:89
uint32_t pc_reserved1
Definition: title.h:70
uint32_t title_version
Definition: title.h:47
uint64_t ACPTitleId
Definition: title.h:20
ACPResult ACPGetTitleIdOfMainApplication(ACPTitleId *titleId)
ACPResult ACPAssignTitlePatch(MCPTitleListType *titleInfo)
ACPResult RPLWRAP() ACPGetTitleMetaXml(ACPTitleId titleId, ACPMetaXml *metaXml)
Gets the MetaXML for a given title id.
Definition: title.h:264
ACPResult ACPGetTitleMetaDirByDevice(ACPTitleId titleId, char *directory, size_t directoryLen, ACPDeviceType deviceType)
#define RPLWRAP(func)
Definition: wut_rplwrap.h:3