Executable: Difference between revisions

imported>Leoetlino
Linga (talk | contribs)
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
The '''executable''' is where all the game code is stored. It is located in the title code directory on Wii U and in the [[switchbrew:ExeFS|ExeFS]] on Switch.
The '''executable''' is where all the game code is stored. It is located in the title code directory on Wii U and in the [[switchbrew:ExeFS|ExeFS]] on Switch.
Important note: unless otherwise stated, all addresses on this wiki are for the Switch 1.5.0 executable.


== File ==
== File ==
Line 5: Line 7:
BotW's executable is a standard, compressed [[switchbrew:NSO|NSO]] which is larger than most other games (about 20MB compressed).
BotW's executable is a standard, compressed [[switchbrew:NSO|NSO]] which is larger than most other games (about 20MB compressed).


The build path is <code>D:\home\Cafe\U-King\trunk\Game\App\Rom\NX64\Product\code\U-King.nss</code> and the build ID for 1.5.0 is <code>16A91992BBA71201E98756F3BC8F5D2F00000000000000000000000000000000</code>.
The build path is <code>D:\home\Cafe\U-King\trunk\Game\App\Rom\NX64\Product\code\U-King.nss</code>. For build IDs, see [[Versions#Switch_versions]].


=== Wii U ===
=== Wii U ===
Line 17: Line 19:


== Symbols ==
== Symbols ==
Unfortunately, release versions of ''The Legend of Zelda: Breath of the Wild'' are stripped and have absolutely no debugging symbols. This has been verified for Switch 1.0.0, Wii U 1.5.0 and Switch 1.5.0.
Unfortunately, release versions of ''The Legend of Zelda: Breath of the Wild'' are stripped and have absolutely no debugging symbols. This has been verified for Switch 1.0.0, Wii U 1.5.0, Switch 1.5.0, Switch 1.6.0 and Switch RID_Demo.


The Switch 1.5.0 executable only has some RTTI data for UI classes.
The Switch 1.5.0 and 1.6.0 executables only have some RTTI data for UI classes. This is likely also the case for all older versions.


However, the game uses lots of [[Software libraries|software libraries]], some of which are included in games that do ship with complete symbols such as ''Super Mario Odyssey''. BotW seems to have been compiled at a higher optimisation level that causes unused functions to be fully removed.
However, the game uses lots of [[Software libraries|software libraries]], some of which are included in games that do ship with complete symbols such as ''Super Mario Odyssey''. BotW seems to have been compiled at a higher optimisation level that causes unused functions to be fully removed.
Line 243: Line 245:
== Internal version ==
== Internal version ==
1.0.0's nnMain prints "00000010", whereas 1.5.0 prints "0000002d".
1.0.0's nnMain prints "00000010", whereas 1.5.0 prints "0000002d".
1.6.0 prints "0000002e".


== Unused content ==
== Unused content ==
Line 258: Line 262:
</pre>
</pre>


=== Leftover debug tools ===
=== Leftover debug or development tools ===
==== ActorCapture ====
See [[ActorCapture]] for more information.
 
The resource factory and resource classes are still present in release builds, but no ActorCapture parameter files are included in the ROM.
 
==== EventPatroller ====
Used to generate movies (prerendered cutscenes) for event flows. Receives orders via HostIO (in BYML format) in <code>%UKING_ROOT%/../workdir/EventPatroller/order.byml</code> and writes:
 
* A YAML report containing frame-by-frame data with camera position, actor information, etc. Written to <code>%s/report.yml</code> % (name).
* Screenshots for the entire event (maximum 18000 frames) captured using agl::utl::ScreenshotMgr, and written to <code>%s/%05d.tga</code> % (name, frame).
 
Throughout the execution of the order, <code>%%KSYS_ROOT%%/tools/EventPatroller/ChangeStatus.bat</code> is spawned to update the order status on the host computer.
 
EventPatroller can apparently make use of Havok script files (hks) in dev builds<ref><code>script_name</code> (in the order data) is a path to a hks file.</ref>. However, all script-related code is stubbed in release builds and both the <code>hks</code> and <code>lua</code> resource factories are unused.
 
==== Placement ====
The <code>bplacement</code> resource factory is stubbed in release builds. The associated resource class is also stubbed. It is unknown what Placement files would have contained. (Configuration for the [[PlacementMgr]]?)
 
Given the small resource size, it is likely that bplacement files are not [[AAMP]] resources but [[BYML]]s.
 
==== Demo ROM types ====
==== Demo ROM types ====
The game calls <code>sead::EnvUtil::getRomType()</code> to get the ROM type. The result is printed to a debug log along with SD card, revision and AoC (DLC) information.
The game calls <code>sead::EnvUtil::getRomType()</code> to get the ROM type. The result is printed to a debug log along with SD card, revision and AoC (DLC) information.
Line 269: Line 293:
* Anything else is treated as "Normal".
* Anything else is treated as "Normal".


The release build crashes if the ROM type is set to Show_2017_1st or RID_Demo, presumably because these types activate code paths that require a global debug heap which never gets initialised in release versions.
If the ROM type is set to Show_2017_1st or RID_Demo in release build, the title will change to the demo menu.


==== ErrorViewer and Stage Select ====
==== ErrorViewer and Stage Select ====