<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DarkLordZach</id>
	<title>Nintendo Switch Brew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DarkLordZach"/>
	<link rel="alternate" type="text/html" href="https://switchbrew.org/wiki/Special:Contributions/DarkLordZach"/>
	<updated>2026-04-26T22:07:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Error_applet&amp;diff=6022</id>
		<title>Error applet</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Error_applet&amp;diff=6022"/>
		<updated>2019-01-11T13:25:52Z</updated>

		<summary type="html">&lt;p&gt;DarkLordZach: Add ApplicationError and ShowErrorRecord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The error applet is used to display an error result by several titles and applets. (AppletId 0xE)&lt;br /&gt;
&lt;br /&gt;
Depending on the type, the applet will display the error in several ways.&lt;br /&gt;
&lt;br /&gt;
It takes two input storages: common arguments and a custom storage.&lt;br /&gt;
&lt;br /&gt;
== Error applet types ==&lt;br /&gt;
&lt;br /&gt;
=== Common ===&lt;br /&gt;
&lt;br /&gt;
For all of the following structures, the first two bytes are common and identify mode.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 1 || 0 || Error Applet Mode&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 1 || 1 || Whether or not to use &#039;jump&#039; mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In SDK, the jump mode byte is always one, except for nn::err::ShowErrorWithoutJump. HW-Testing has shown this to have no visual impact on error applet.&lt;br /&gt;
&lt;br /&gt;
=== Error (common one) ===&lt;br /&gt;
&lt;br /&gt;
Takes a CommonArgs storage with version 0.&lt;br /&gt;
Uses a mode byte of 0 in the above struct.&lt;br /&gt;
&lt;br /&gt;
==== Custom storage ====&lt;br /&gt;
&lt;br /&gt;
Unknown exact size, using size 20 seems to work fine.&lt;br /&gt;
&lt;br /&gt;
The type (byte 0 of this storage) is 0.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 4 (u32) || 0 (2000-0000) || Result code, same Result type used everywhere in HOS.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The error will display error code 2000-0000 if the Result is not set. The text is the default one.&lt;br /&gt;
&lt;br /&gt;
=== SystemError ===&lt;br /&gt;
&lt;br /&gt;
Takes a CommonArgs storage with version 0.&lt;br /&gt;
Uses a mode byte of 1 in the above struct.&lt;br /&gt;
&lt;br /&gt;
==== Custom storage ====&lt;br /&gt;
&lt;br /&gt;
SDK uses size 4120 for this storage.&lt;br /&gt;
&lt;br /&gt;
The type (byte 0 of this storage) is 1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 8 (u64) || 0 (0000-0000) || ErrorCode (not Result like in normal errors) of the error to use.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x800 || - || String of the text to be shown as a short description of the error.&lt;br /&gt;
|-&lt;br /&gt;
| 0x818 || 0x800 || - || String of the text to be shown as a more detailed description of the error.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the first text is not specified but the second one is, the applet will directly load the &amp;quot;Details&amp;quot; display with the second error text.&lt;br /&gt;
&lt;br /&gt;
If both texts are set, the applet will load the dialog with &amp;quot;Close&amp;quot; and &amp;quot;Details&amp;quot; options, and will load the display mentiones above after selecting &amp;quot;Details&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If no ErrorCode is supplied, the applet will use 0000-0000.&lt;br /&gt;
&lt;br /&gt;
=== ApplicationError ===&lt;br /&gt;
&lt;br /&gt;
Allows an application to show a custom-defined error text.&lt;br /&gt;
Uses a mode byte of 2 in the above struct.&lt;br /&gt;
&lt;br /&gt;
The SDK uses size 4116 (0x1014) for this storage.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 4 (u32) || 0 (0000-0000) || ErrorCode of the error to use.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 8 (u64) || &#039;en-US\0&#039; || The Language of the following text. This uses the same language names as settings service.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x800 || - || String of the text to be shown as a short description of the error.&lt;br /&gt;
|-&lt;br /&gt;
| 0x814 || 0x800 || - || String of the text to be shown as a more detailed description of the error.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On hardware, the short description will be displayed initially in a dialog box with the error code. There is a details button that when clicked will display the detailed description.&lt;br /&gt;
&lt;br /&gt;
=== ShowErrorRecord (ShowError with Timestamp) ===&lt;br /&gt;
&lt;br /&gt;
Uses common arguments version 0 and a mode byte of 5.&lt;br /&gt;
&lt;br /&gt;
Performs the same function as ShowError, but also displays the date and time of error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Typical Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 8 (u64) || 0 (0000-0000) || Result code to use. This is formatted with the first u32 = description and second u32 = module + 2000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 8 (u64) || 0 (Jan 1, 1970 00:00:00 AM) || POSIX time of the error to be displayed (as seconds since epoch).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unlike ShowError, this is fullscreen and not a dialog.&lt;/div&gt;</summary>
		<author><name>DarkLordZach</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Profile_Selector&amp;diff=5601</id>
		<title>Profile Selector</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Profile_Selector&amp;diff=5601"/>
		<updated>2018-11-23T05:00:57Z</updated>

		<summary type="html">&lt;p&gt;DarkLordZach: Describes the library applet interaction for the ProfileSelect applet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the UX presented when launching a game that allows the user to select a user.&lt;br /&gt;
&lt;br /&gt;
The profile selector expects a two [[AM_services#IStorage|IStorage]] inputs and a single [[AM_services#IStorage|IStorage]] output.&lt;br /&gt;
&lt;br /&gt;
The first IStorage is identical to [[Software_Keyboard#Common_Arguments|Common Arguments]] from swkbd.&lt;br /&gt;
&lt;br /&gt;
== UserSelectionConfig ==&lt;br /&gt;
&lt;br /&gt;
This has size 0xA0 and seems to only affect the UI display. &lt;br /&gt;
Typical value is all zero with byte 0x96 equal to 0x01&lt;br /&gt;
&lt;br /&gt;
== Result == &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || Result (0 = Success, 2 = Failure)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x10 || UUID of selected user&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || || End of Struct&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage == &lt;br /&gt;
&lt;br /&gt;
Homebrew should push a common arguments struct and the typical UserSelectionConfig struct as well.&lt;br /&gt;
After pushing in the data and calling start, homebrew should wait upon the PopOutDataEvent and then pop a single IStorage to obtain the result structure described above.&lt;/div&gt;</summary>
		<author><name>DarkLordZach</name></author>
	</entry>
</feed>