https://www.3dbrew.org/w/api.php?action=feedcontributions&user=Rei&feedformat=atom3dbrew - User contributions [en]2024-03-29T00:34:10ZUser contributionsMediaWiki 1.35.8https://www.3dbrew.org/w/index.php?title=NS_and_APT_Services&diff=17674NS and APT Services2016-07-12T17:46:41Z<p>Rei: /* APT Services */</p>
<hr />
<div>[[Category:Services]]<br />
The NS ('''N'''intendo User Interface '''S'''hell) system module is the first module launched from a CTR-NAND title after the [[FIRM]] processes are loaded (also see [[Bootloader]]). This module is launched by the pm process, with the titleID loaded from NS state(hard-coded TID initialized during applet TID-array initialization). NS first launches [[ErrDisp]], then the menu. On retail the menu TID is loaded from NS state, while on dev/debug the menu TID is loaded from [[Config_Savegame|config]]. On dev-units if the menu TID block doesn't exist in [[Config_Savegame|config]], NS will attempt to launch the alternate menu instead. The TID of the launched menu is then written to [[Configuration Memory|ACTIVEMENUTID]]. NS uses [[PMApp:LaunchTitle|pm:app]] to launch titles.<br />
<br />
NS will not trigger the [[ErrDisp|fatal-error]] screen when launching the regular/alternate menu fails.<br />
<br />
Like home menu NS is constantly running while the system is in 3DS-mode. When attempting to return to home-menu when the home-menu process isn't running(like when the process terminated/crashed), NS will trigger a [[ErrDisp|fatal]] error.<br />
<br />
= Alternate menu =<br />
When launching the regular menu fails, NS will then attempt to launch the alternate menu. This title could be used as a recovery process, however it's normally not used after the factory.<br />
<br />
At the factory for all 3DS systems, [[3DS Development Unit GUI#Test Menu|Test Menu]] is installed with this TID. On retail this title is eventually deleted during [[Factory Setup]].<br />
<br />
= Auto-boot =<br />
After [[PMApp:GetFIRMLaunchParams|loading]] [[FIRM]] params and prior to launching [[ErrDisp]]/Home Menu, NS handles auto-booting titles. The same code called by [[APT:Reboot]] is used for launching FIRM here. When the [[Configuration_Memory|UPDATEFLAG]] is set, NS will launch SAFE_MODE_FIRM with the application titleID set to the [[System_Settings#System_Updater|System Updater]] titleID for this region. When the UPDATEFLAG is not set, NS can auto-boot the following titles as well if [[Configuration_Memory|0x1FF80016]] bit0 is set.<br />
<br />
When bit1 and bit2 are value zero in [[Configuration_Memory|0x1FF80016]], NS will [[NSS:LaunchFIRM|launch]] the title specified by the [[FIRM]] parameters if the title-info is set. This FIRM launch is done after launching [[ErrDisp]] and Home Menu. Otherwise when [[Configuration_Memory|0x1FF80016]] is value 2 and the output u8 from [[PTM|PTMSYSM]] command 0x08140000 is value 0, NS will boot the title specified from the TWL TLNC block from FIRMparams+0x300. This is the same TLNC block which DSi titles wrote to RAM+0x300 for launching other titles via the launcher title. When handling the TLNC block, NS will boot the 3DS System Settings title when the TLNC titleID is the DSi System Settings titleID(the region field in the TLNC TID is not checked/used). When the TLNC titleID is not System Settings, NS will convert the input DSi titleID-high to the 3DS TWL titleID-high(tidhigh = (TLNCtidhigh & 0x7FFF) | 0x48000), then launch TWL_FIRM to run the title. NS does not support launching from gamecard via TLNC.<br />
<br />
= NS Workaround =<br />
A "ns_workaround" was [[5.1.0-11|added]] in NS to workaround the flaw added with [[5.0.0-11]]. When NS is loading before launching any ARM11 processes and certain [[Configuration Memory]] fields are set, NS will launch [[Application_Manager_Services|AM]] then use command [[AM:InstallNATIVEFIRM]]. NS will then execute the code called by [[APT:StartNewestHomeMenu]], the code related to APT:PrepareToStartNewestHomeMenu is not executed here.<br />
<br />
NS will only execute this code-path when [[Configuration Memory|0x1FF80016]] is value zero, when KERNEL_VERSIONMAJOR is value 2, and when KERNEL_VERSIONMINOR is less than 35. Therefore, this code-path is only executed when the running NATIVE_FIRM version is prior to [[5.0.0-11]].<br />
<br />
= NS Service "ns:s" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version<br />
! Description<br />
|-<br />
| 0x000100C0<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:LaunchFIRM|LaunchFIRM]]<br />
|-<br />
| 0x000200C0<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:LaunchTitle|LaunchTitle]]<br />
|-<br />
| 0x00030000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:TerminateApplication|TerminateApplication]]<br />
|-<br />
| 0x00040040<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:TerminateProcess|TerminateProcess]]<br />
|-<br />
| 0x000500C0<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:LaunchApplicationFIRM|LaunchApplicationFIRM]]<br />
|-<br />
| 0x00060042<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:SetWirelessRebootInfo|SetWirelessRebootInfo]]<br />
|-<br />
| 0x00070042<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:CardUpdateInitialize|CardUpdateInitialize]]<br />
|-<br />
| 0x00080000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:CardUpdateShutdown|CardUpdateShutdown]]<br />
|-<br />
| 0x00090000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| Gamecard system update related.<br />
|-<br />
| 0x000A0000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| Gamecard system update related.<br />
|-<br />
| 0x000B0000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| Gamecard system update related.<br />
|-<br />
| 0x000C0000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| Gamecard system update related.<br />
|-<br />
| 0x000D0140<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:SetTWLBannerHMAC|SetTWLBannerHMAC]]<br />
|-<br />
| 0x000E0000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:ShutdownAsync|ShutdownAsync]]<br />
|-<br />
| 0x000F0000<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| This calls [[APT:AppletUtility]] with fixed input params.<br />
|-<br />
| 0x00100180<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:RebootSystem|RebootSystem]]<br />
|-<br />
| 0x00110100<br />
| [[1.0.0-0]] - [[2.0.0-2]]<br />
| [[NSS:TerminateTitle|TerminateTitle]]<br />
|-<br />
| 0x001200C0<br />
| ?<br />
| [[NSS:SetApplicationCpuTimeLimit|SetApplicationCpuTimeLimit]]<br />
|-<br />
| 0x00130000<br />
| ?<br />
| ?<br />
|-<br />
| 0x00140042<br />
| ?<br />
| ?<br />
|-<br />
| 0x00150140<br />
| ?<br />
| [[NSS:LaunchApplication|LaunchApplication]]<br />
|-<br />
| 0x00160000<br />
| [[8.0.0-18]]<br />
| [[NSS:RebootSystemClean|RebootSystemClean]]<br />
|}<br />
<br />
The maximum sessions that can be used with this service is two, therefore only two processes can use this service at the same time.<br />
<br />
=NS Power Service "ns:p"=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010040<br />
| [[NSP:RebootSystem|RebootSystem]]<br />
|-<br />
| 0x00020000<br />
| [[NSS:ShutdownAsync|ShutdownAsync]]<br />
|}<br />
<br />
This was added with [[3.0.0-5]]. The PTM sysmodule connects to this service, and syncs whenever [[PTM|ptm:s GetShellState()]] changes.<br />
<br />
=NS Service "ns:c"=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010100<br />
| ?<br />
|-<br />
| 0x00020100<br />
| ?<br />
|}<br />
<br />
This was added with [[5.0.0-11]], it's unknown what this is used for.<br />
<br />
=APT Services=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version<br />
! Accessible with APT:U<br />
! Description<br />
|-<br />
| 0x00010040<br />
| <br />
| Yes<br />
| [[APT:GetLockHandle|GetLockHandle]]<br />
|-<br />
| 0x00020080<br />
| <br />
| See [[APT:Initialize|here]].<br />
| [[APT:Initialize|Initialize]]<br />
|-<br />
| 0x00030040<br />
| <br />
| Yes<br />
| [[APT:Enable|Enable]]<br />
|-<br />
| 0x00040040<br />
| <br />
| Yes<br />
| [[APT:Finalize|Finalize]]<br />
|-<br />
| 0x00050040<br />
| <br />
| Yes<br />
| [[APT:GetAppletManInfo|GetAppletManInfo]]<br />
|-<br />
| 0x00060040<br />
| <br />
| Yes<br />
| [[APT:GetAppletInfo|GetAppletInfo]]<br />
|-<br />
| 0x00070000<br />
| <br />
| Yes<br />
| [[APT:GetLastSignaledAppletId|GetLastSignaledAppletId]]<br />
|-<br />
| 0x00080000<br />
| <br />
| Yes<br />
| [[APT:CountRegisteredApplet|CountRegisteredApplet]]<br />
|-<br />
| 0x00090040<br />
| <br />
| Yes<br />
| [[APT:IsRegistered|IsRegistered]]<br />
|-<br />
| 0x000A0040<br />
| <br />
| Yes<br />
| [[APT:GetAttribute|GetAttribute]]<br />
|-<br />
| 0x000B0040<br />
| <br />
| Yes<br />
| [[APT:InquireNotification|InquireNotification]]<br />
|-<br />
| 0x000C0104<br />
| <br />
| Yes<br />
| [[APT:SendParameter|SendParameter]]<br />
|-<br />
| 0x000D0080<br />
| <br />
| Yes<br />
| [[APT:ReceiveParameter|ReceiveParameter]]<br />
|-<br />
| 0x000E0080<br />
| <br />
| Yes<br />
| [[APT:GlanceParameter|GlanceParameter]]<br />
|-<br />
| 0x000F0100<br />
| <br />
| Yes<br />
| [[APT:CancelParameter|CancelParameter]]<br />
|-<br />
| 0x001000C2<br />
| <br />
| Yes<br />
| [[APT:DebugFunc|DebugFunc]]<br />
|-<br />
| 0x001100C0<br />
| <br />
| Yes<br />
| [[APT:MapProgramIdForDebug|MapProgramIdForDebug]]<br />
|-<br />
| 0x00120040<br />
| <br />
| Yes<br />
| [[APT:SetHomeMenuAppletIdForDebug|SetHomeMenuAppletIdForDebug]]<br />
|-<br />
| 0x00130000<br />
| <br />
| Yes<br />
| [[APT:GetPreparationState|GetPreparationState]]<br />
|-<br />
| 0x00140040<br />
| <br />
| Yes<br />
| [[APT:SetPreparationState|SetPreparationState]]<br />
|-<br />
| 0x00150140<br />
| <br />
| No<br />
| [[APT:PrepareToStartApplication|PrepareToStartApplication]]<br />
|-<br />
| 0x00160040<br />
| <br />
| Yes<br />
| [[APT:PreloadLibraryApplet|PreloadLibraryApplet]]<br />
|-<br />
| 0x00170040<br />
| <br />
| Yes<br />
| [[APT:FinishPreloadingLibraryApplet|FinishPreloadingLibraryApplet]]<br />
|-<br />
| 0x00180040<br />
| <br />
| Yes<br />
| [[APT:PrepareToStartLibraryApplet|PrepareToStartLibraryApplet]]<br />
|-<br />
| 0x00190040<br />
| <br />
| Yes<br />
| [[APT:PrepareToStartSystemApplet|PrepareToStartSystemApplet]]<br />
|-<br />
| 0x001A0000<br />
| <br />
| Yes<br />
| [[APT:PrepareToStartNewestHomeMenu|PrepareToStartNewestHomeMenu]]<br />
|-<br />
| 0x001B00C4<br />
| <br />
| Yes<br />
| [[APT:StartApplication|StartApplication]]<br />
|-<br />
| 0x001C0000<br />
| <br />
| Yes<br />
| [[APT:WakeupApplication|WakeupApplication]]<br />
|-<br />
| 0x001D0000<br />
| <br />
| Yes<br />
| [[APT:CancelApplication|CancelApplication]]<br />
|-<br />
| 0x001E0084<br />
| <br />
| Yes<br />
| [[APT:StartLibraryApplet|StartLibraryApplet]]<br />
|-<br />
| 0x001F0084<br />
| <br />
| Yes<br />
| [[APT:StartSystemApplet|StartSystemApplet]]<br />
|-<br />
| 0x00200044<br />
| <br />
| Yes<br />
| [[APT:StartNewestHomeMenu|StartNewestHomeMenu]]<br />
|-<br />
| 0x00210000<br />
| <br />
| No<br />
| [[APT:OrderToCloseApplication|OrderToCloseApplication]]<br />
|-<br />
| 0x00220040<br />
| <br />
| Yes<br />
| [[APT:PrepareToCloseApplication|PrepareToCloseApplication]]<br />
|-<br />
| 0x00230040<br />
| <br />
| Yes<br />
| [[APT:PrepareToJumpToApplication|PrepareToJumpToApplication]]<br />
|-<br />
| 0x00240044<br />
| <br />
| Yes<br />
| [[APT:JumpToApplication|JumpToApplication]]<br />
|-<br />
| 0x002500C0<br />
| <br />
| Yes<br />
| [[APT:PrepareToCloseLibraryApplet|PrepareToCloseLibraryApplet]]<br />
|-<br />
| 0x00260000<br />
| <br />
| Yes<br />
| [[APT:PrepareToCloseSystemApplet|PrepareToCloseSystemApplet]]<br />
|-<br />
| 0x00270044<br />
| <br />
| Yes<br />
| [[APT:CloseApplication|CloseApplication]]<br />
|-<br />
| 0x00280044<br />
| <br />
| Yes<br />
| [[APT:CloseLibraryApplet|CloseLibraryApplet]]<br />
|-<br />
| 0x00290044<br />
| <br />
| Yes<br />
| [[APT:CloseSystemApplet|CloseSystemApplet]]<br />
|-<br />
| 0x002A0000<br />
| <br />
| Yes<br />
| [[APT:OrderToCloseSystemApplet|OrderToCloseSystemApplet]]<br />
|-<br />
| 0x002B0000<br />
| <br />
| Yes<br />
| [[APT:PrepareToJumpToHomeMenu|PrepareToJumpToHomeMenu]]<br />
|-<br />
| 0x002C0044<br />
| <br />
| Yes<br />
| [[APT:JumpToHomeMenu|JumpToHomeMenu]]<br />
|-<br />
| 0x002D0000<br />
| <br />
| Yes<br />
| [[APT:PrepareToLeaveHomeMenu|PrepareToLeaveHomeMenu]]<br />
|-<br />
| 0x002E0044<br />
| <br />
| Yes<br />
| [[APT:LeaveHomeMenu|LeaveHomeMenu]]<br />
|-<br />
| 0x002F0040<br />
| <br />
| Yes<br />
| [[APT:PrepareToLeaveResidentApplet|PrepareToLeaveResidentApplet]]<br />
|-<br />
| 0x00300044<br />
| <br />
| Yes<br />
| [[APT:LeaveResidentApplet|LeaveResidentApplet]]<br />
|-<br />
| 0x00310100<br />
| <br />
| Yes<br />
| [[APT:PrepareToDoApplicationJump|PrepareToDoApplicationJump]]<br />
|-<br />
| 0x00320084<br />
| <br />
| Yes<br />
| [[APT:DoApplicationJump|DoApplicationJump]]<br />
|-<br />
| 0x00330000<br />
| <br />
| Yes<br />
| [[APT:GetProgramIdOnApplicationJump|GetProgramIdOnApplicationJump]]<br />
|-<br />
| 0x00340084<br />
| <br />
| Yes<br />
| [[APT:SendDeliverArg|SendDeliverArg]]<br />
|-<br />
| 0x00350080<br />
| <br />
| Yes<br />
| [[APT:ReceiveDeliverArg|ReceiveDeliverArg]]<br />
|-<br />
| 0x00360040<br />
| <br />
| Yes<br />
| [[APT:LoadSysMenuArg|LoadSysMenuArg]]<br />
|-<br />
| 0x00370042<br />
| <br />
| Yes<br />
| [[APT:StoreSysMenuArg|StoreSysMenuArg]]<br />
|-<br />
| 0x00380040<br />
| <br />
| Yes<br />
| [[APT:PreloadResidentApplet|PreloadResidentApplet]]<br />
|-<br />
| 0x00390040<br />
| <br />
| Yes<br />
| [[APT:PrepareToStartResidentApplet|PrepareToStartResidentApplet]]<br />
|-<br />
| 0x003A0044<br />
| <br />
| Yes<br />
| [[APT:StartResidentApplet|StartResidentApplet]]<br />
|-<br />
| 0x003B0040<br />
| <br />
| Yes<br />
| [[APT:CancelLibraryApplet|CancelLibraryApplet]]<br />
|-<br />
| 0x003C0042<br />
| <br />
| Yes<br />
| [[APT:SendDspSleep|SendDspSleep]]<br />
|-<br />
| 0x003D0042<br />
| <br />
| Yes<br />
| [[APT:SendDspWakeUp|SendDspWakeUp]]<br />
|-<br />
| 0x003E0080<br />
| <br />
| Yes<br />
| [[APT:ReplySleepQuery|ReplySleepQuery]]<br />
|-<br />
| 0x003F0040<br />
| <br />
| Yes<br />
| [[APT:ReplySleepNotificationComplete|ReplySleepNotificationComplete]]<br />
|-<br />
| 0x00400042<br />
| <br />
| Yes<br />
| [[APT:SendCaptureBufferInfo|SendCaptureBufferInfo]]<br />
|-<br />
| 0x00410040<br />
| <br />
| Yes<br />
| [[APT:ReceiveCaptureBufferInfo|ReceiveCaptureBufferInfo]]<br />
|-<br />
| 0x00420080<br />
| <br />
| Yes<br />
| [[APT:SleepSystem|SleepSystem]]<br />
|-<br />
| 0x00430040<br />
| <br />
| Yes<br />
| [[APT:NotifyToWait|NotifyToWait]]<br />
|-<br />
| 0x00440000<br />
| <br />
| Yes<br />
| [[APT:GetSharedFont|GetSharedFont]]<br />
|-<br />
| 0x00450040<br />
| <br />
| Yes<br />
| [[APT:GetWirelessRebootInfo|GetWirelessRebootInfo]]<br />
|-<br />
| 0x00460104<br />
| <br />
| Yes<br />
| [[APT:Wrap|Wrap]]<br />
|-<br />
| 0x00470104<br />
| <br />
| Yes<br />
| [[APT:Unwrap|Unwrap]]<br />
|-<br />
| 0x00480100<br />
| <br />
| No<br />
| [[APT:GetProgramInfo|GetProgramInfo]]<br />
|-<br />
| 0x00490180<br />
| <br />
| No<br />
| [[APT:Reboot|Reboot]]<br />
|-<br />
| 0x004A0040<br />
| <br />
| Yes<br />
| [[APT:GetCaptureInfo|GetCaptureInfo]]<br />
|-<br />
| 0x004B00C2<br />
| <br />
| Yes<br />
| [[APT:AppletUtility|AppletUtility]]<br />
|-<br />
| 0x004C0000<br />
| <br />
| Yes<br />
| [[APT:SetFatalErrDispMode|SetFatalErrDispMode]]<br />
|-<br />
| 0x004D0080<br />
| <br />
| Yes<br />
| [[APT:GetAppletProgramInfo|GetAppletProgramInfo]]<br />
|-<br />
| 0x004E0000<br />
| <br />
| Yes<br />
| [[APT:HardwareResetAsync|HardwareResetAsync]]<br />
|-<br />
| 0x004F0080<br />
| [[2.2.0-X]]<br />
| Yes<br />
| [[APT:SetApplicationCpuTimeLimit|SetApplicationCpuTimeLimit]]<br />
|-<br />
| 0x00500040<br />
| [[2.2.0-X]]<br />
| Yes<br />
| [[APT:GetApplicationCpuTimeLimit|GetApplicationCpuTimeLimit]]<br />
|-<br />
| 0x00510080<br />
| [[3.0.0-5]]<br />
| Yes<br />
| [[APT:GetStartupArgument|GetStartupArgument]]<br />
|-<br />
| 0x00520104<br />
| [[4.0.0-7]]<br />
| Yes<br />
| [[APT:Wrap1|Wrap1]]<br />
|-<br />
| 0x00530104<br />
| [[4.0.0-7]]<br />
| Yes<br />
| [[APT:Unwrap1|Unwrap1]]<br />
|-<br />
| 0x00540040<br />
| [[5.0.0-11]]<br />
| ?<br />
| ?<br />
|-<br />
| 0x00550040<br />
| [[7.0.0-13]]<br />
| Yes<br />
| This writes the input u8 to a NS state field.<br />
|-<br />
| 0x00560000<br />
| [[7.0.0-13]]<br />
| Yes<br />
| [[APT:GetScreencapPostPermission|GetScreencapPostPermission]]<br />
|-<br />
| 0x00570044<br />
| [[7.0.0-13]]<br />
| ?<br />
| [[APT:WakeupApplication2|WakeupApplication2]]<br />
|-<br />
| 0x00580002<br />
| [[7.0.0-13]]<br />
| Yes<br />
| [[APT:GetProgramID|GetProgramID]]<br />
|-<br />
| 0x01010000<br />
| [[8.0.0-18]]<br />
| Yes<br />
| [[APT:CheckNew3DSApp|CheckNew3DSApp]]<br />
|-<br />
| 0x01020000<br />
| [[8.0.0-18]]<br />
| Yes<br />
| [[APT:CheckNew3DS|CheckNew3DS]]<br />
|-<br />
| 0x01030000<br />
| [[8.0.0-18]]<br />
| Yes<br />
| This writes an output u8 to cmdreply[2], the value is determined by checking various NS internal state + whether this is a New3DS.<br />
The normal output seems to be value 0x2. Forcing this value to 0x1 causes New3DS HID usage(via ir:USER) in Smash Bros to be disabled.<br />
|-<br />
| 0x01040000<br />
| [[8.0.0-18]]<br />
| ?<br />
| [[APT:IsStandardMemoryLayout|IsStandardMemoryLayout]]<br />
|-<br />
| 0x01050100<br />
| [[10.4.0-29]]<br />
| ?<br />
| [[APT:IsTitleAllowed|IsTitleAllowed]]<br />
|}<br />
<br />
These "APT:U" and "APT:S" NS services can handle launching titles/"applets", these services handle signaling for home/power button as well. Only one session for either APT service can be open at a time, normally processes close the service handle immediately once finished using the service. The commands for APT:U and APT:S are exactly the same, however certain commands are only accessible with APT:S(NS module will call [[SVC|svcBreak]] when the command isn't accessible).<br />
<br />
Applets returning to home-menu first use commands APT:PrepareToJumpToHomeMenu and APT:JumpToHomeMenu, followed by these commands to launch home-menu: [[APT:PrepareToStartSystemApplet]] and [[APT:StartSystemApplet]]. [[APT:PrepareToStartSystemApplet]] and [[APT:StartSystemApplet]] are also used for launching the [[Internet Browser]], the camera applet, etc.<br />
<br />
Processes launch applications via home-menu, not directly with [[APT:PrepareToStartApplication]] and [[APT:StartApplication]]. Regular applications can't directly launch applications since [[APT:StartApplication]] launches the process without terminating the currently running application.<br />
<br />
APT:PrepareToDoApplicationJump and APT:DoApplicationJump are used by applications, for launching native/<non-NATIVE_FIRM> applications. These commands notify Home Menu that title launching needs done, Home Menu does the actual title launching via NS commands.<br />
<br />
== AppletAttr ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Bits<br />
! Description<br />
|-<br />
| 0-2<br />
| [[NS_and_APT_Services#AppletPos|AppletPos]]<br />
|-<br />
| 3<br />
| Manually Acquire/Release GPU Rights<br />
|-<br />
| 4<br />
| Manually Acquire/Release DSP Rights<br />
|-<br />
| 5<br />
| ?<br />
|}<br />
<br />
== DisplayBufferMode ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| FORMAT_R8G8B8A8<br />
|-<br />
| 1<br />
| FORMAT_R8G8B8<br />
|-<br />
| 2<br />
| FORMAT_R5G6B5<br />
|-<br />
| 3<br />
| FORMAT_R5G5B5A1<br />
|-<br />
| 4<br />
| FORAMT_R4G4B4A4<br />
|-<br />
| 0xFFFFFFFF<br />
| FORMAT_UNIMPORTABLE<br />
|}<br />
<br />
This is the same mapping as used for the [[GPU/External_Registers#Framebuffer_color_formats|GPU framebuffer color formats]].<br />
<br />
== AppletPos ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| -1<br />
| POS_NONE<br />
|-<br />
| 0<br />
| POS_APP<br />
|-<br />
| 1<br />
| POS_APPLIB<br />
|-<br />
| 2<br />
| POS_SYS<br />
|-<br />
| 3<br />
| POS_SYSLIB<br />
|-<br />
| 4<br />
| POS_RESIDENT<br />
|}<br />
<br />
== QueryReply ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| REPLY_REJECT<br />
|-<br />
| 1<br />
| REPLY_ACCEPT<br />
|-<br />
| 2<br />
| REPLY_LATER<br />
|}<br />
<br />
== Notification ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| NOTIFICATION_NONE<br />
|-<br />
| 1<br />
| NOTIFICATION_HOME_BUTTON_1<br />
|-<br />
| 2<br />
| NOTIFICATION_HOME_BUTTON_2<br />
|-<br />
| 3<br />
| NOTIFICATION_SLEEP_QUERY<br />
|-<br />
| 4<br />
| NOTIFICATION_SLEEP_CANCELED_BY_OPEN<br />
|-<br />
| 5<br />
| NOTIFICATION_SLEEP_ACCEPTED<br />
|-<br />
| 6<br />
| NOTIFICATION_SLEEP_AWAKE<br />
|-<br />
| 7<br />
| NOTIFICATION_SHUTDOWN<br />
|-<br />
| 8<br />
| NOTIFICATION_POWER_BUTTON_CLICK<br />
|-<br />
| 9<br />
| NOTIFICATION_POWER_BUTTON_CLEAR<br />
|-<br />
| 10<br />
| NOTIFICATION_TRY_SLEEP<br />
|-<br />
| 11<br />
| NOTIFICATION_ORDER_TO_CLOSE<br />
|}<br />
<br />
== Command ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| COMMAND_NONE<br />
|-<br />
| 1<br />
| COMMAND_WAKEUP<br />
|-<br />
| 2<br />
| COMMAND_REQUEST<br />
|-<br />
| 3<br />
| COMMAND_RESPONSE<br />
|-<br />
| 4<br />
| COMMAND_EXIT<br />
|-<br />
| 5<br />
| COMMAND_MESSAGE<br />
|-<br />
| 6<br />
| COMMAND_HOME_BUTTON_SINGLE<br />
|-<br />
| 7<br />
| COMMAND_HOME_BUTTON_DOUBLE<br />
|-<br />
| 8<br />
| COMMAND_DSP_SLEEP<br />
|-<br />
| 9<br />
| COMMAND_DSP_WAKEUP<br />
|-<br />
| 10<br />
| COMMAND_WAKEUP_BY_EXIT<br />
|-<br />
| 11<br />
| COMMAND_WAKEUP_BY_PAUSE<br />
|-<br />
| 12<br />
| COMMAND_WAKEUP_BY_CANCEL<br />
|-<br />
| 13<br />
| COMMAND_WAKEUP_BY_CANCELALL<br />
|-<br />
| 14<br />
| COMMAND_WAKEUP_BY_POWER_BUTTON_CLICK<br />
|-<br />
| 15<br />
| COMMAND_WAKEUP_TO_JUMP_HOME<br />
|-<br />
| 16<br />
| COMMAND_REQUEST_FOR_SYS_APPLET<br />
|-<br />
| 17<br />
| COMMAND_WAKEUP_TO_LAUNCH_APPLICATION<br />
|}<br />
<br />
== AppletPreparationState ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| NO_PREPARATION<br />
|-<br />
| 1<br />
| PREPARED_TO_LAUNCH_APP<br />
|-<br />
| 2<br />
| PREPARED_TO_CLOSE_APP<br />
|-<br />
| 3<br />
| PREPARED_TO_FORCE_TO_CLOSE_APP<br />
|-<br />
| 4<br />
| PREPARED_TO_PRELOAD_APPLIB<br />
|-<br />
| 5<br />
| PREPARED_TO_LAUNCH_APPLIB<br />
|-<br />
| 6<br />
| PREPARED_TO_CLOSE_APPLIB<br />
|-<br />
| 7<br />
| PREPARED_TO_LAUNCH_SYS<br />
|-<br />
| 8<br />
| PREPARED_TO_CLOSE_SYS<br />
|-<br />
| 9<br />
| PREPARED_TO_PRELOAD_SYSLIB<br />
|-<br />
| 10<br />
| PREPARED_TO_LAUNCH_SYSLIB<br />
|-<br />
| 11<br />
| PREPARED_TO_CLOSE_SYSLIB<br />
|-<br />
| 12<br />
| PREPARED_TO_LAUNCH_RESIDENT<br />
|-<br />
| 13<br />
| PREPARED_TO_LEAVE_RESIDENT<br />
|-<br />
| 14<br />
| PREPARED_TO_DO_HOMEMENU<br />
|-<br />
| 15<br />
| PREPARED_TO_LEAVE_HOMEMENU<br />
|-<br />
| 16<br />
| PREPARED_TO_START_RESIDENT<br />
|-<br />
| 17<br />
| PREPARED_TO_DO_APP_JUMP<br />
|-<br />
| 18<br />
| PREPARED_TO_FORCE_TO_CLOSE_SYS<br />
|-<br />
| 19<br />
| PREPARED_TO_LAUNCH_OTHER_SYS<br />
|-<br />
| 20<br />
| PREPARED_TO_JUMP_TO_APP<br />
|}<br />
<br />
== StartupArgumentType ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| STARTUP_ARGUMENT_TYPE_OTHER_APP<br />
|-<br />
| 1<br />
| STARTUP_ARGUMENT_TYPE_RESTART<br />
|-<br />
| 2<br />
| STARTUP_ARGUMENT_TYPE_OTHER_MEDIA<br />
|}<br />
<br />
== CaptureBufferInfo ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| u32, Size<br />
|-<br />
| 0x4<br />
| 0x1<br />
| u8, 3D (0 = not 3D, 1 = 3D)<br />
|-<br />
| 0x5<br />
| 0x3<br />
| Reserved<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Main Screen Left Offset<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Main Screen Right Offset<br />
|-<br />
| 0x10<br />
| 0x4<br />
| Main Screen [[NS_and_APT_Services#DisplayBufferMode|DisplayBufferMode]]<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Sub Screen Left Offset<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Sub Screen Right Offset<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Sub Screen [[NS_and_APT_Services#DisplayBufferMode|DisplayBufferMode]]<br />
|}<br />
<br />
==WirelessRebootInfo==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x6<br />
| Host MAC address.<br />
|-<br />
| 0x6<br />
| 0x9<br />
| WirelessRebootPassphrase<br />
|-<br />
| 0xF<br />
| 0x1<br />
| Uninitialized<br />
|}<br />
<br />
This is [[NSS:SetWirelessRebootInfo|setup]] by the dlplay system-application, before launching the DLP-child which can then use [[APT:GetWirelessRebootInfo]]. The MAC address and passphrase is used for connecting to the host by the DLP-child. See also [[DLP_Services|here]].<br />
<br />
="APT:A" Service=<br />
This was added with [[7.0.0-13|7.0.0-X]]. Official apps built with the CTRSDK for system-version >=[[7.0.0-13|7.0.0-X]] normally use the "APT:A" service instead of "APT:U". Those processes also have "APT:A" instead of "APT:U" in the service-access-control. It's unknown whether there's anything which is only accessible via "APT:A".<br />
<br />
=Applets=<br />
NS module does not verify that the input appID for the APT service cmds are correct for that type of command. For example, a process-launch of a SystemApplet via LibraryApplet commands works fine(minus the launched-process side of APT probably).<br />
<br />
==System Applets==<br />
On Old3DS there could only be one applet here(Home Menu, Internet Browser, Friend-List, etc) with programID-high 00040030 running at a time. On Old3DS when directly launching one of these 00040030 applets with Home Menu, the Home Menu process will terminate once the process is launched. On Old3DS when returning to Home Menu from that launched process, the Home Menu process is launched again.<br />
<br />
On New3DS the Home Menu process is still running/in-memory, while another system-applet is running. On New3DS it appears that the Home Menu process is terminated+relaunched, when another system-applet terminated without exiting with APT properly.<br />
<br />
==Library Applets==<br />
Library applets can be launched by applications and regular applets. These library applets render to the screen(s) when running, etc. For example, this includes swkbd for text input. See the below appIDs in the 0x2XX range, the actual appID used is 0x4XX however.<br />
<br />
Input data can be sent to the library applet via the NS [[APT:SendParameter|parameter]] buffer, and/or with shared-memory with a shared-mem handle sent to the library applet. Output data from the library applet can be received by [[APT:ReceiveParameter]], the library applet can also use the specified shared-mem for output too.<br />
<br />
=AppIDs=<br />
{| class="wikitable" border="1"<br />
|-<br />
! AppID<br />
! Description<br />
|-<br />
| 0x101<br />
| Home Menu (menu)<br />
|-<br />
| 0x103<br />
| Alternate Menu<br />
|-<br />
| 0x110<br />
| Camera applet (CtrApp)<br />
|-<br />
| 0x112<br />
| Friends List applet (friend)<br />
|-<br />
| 0x113<br />
| Game Notes applet (Cherry)<br />
|-<br />
| 0x114<br />
| [[Internet Browser]] (spider/SKATER)<br />
|-<br />
| 0x115<br />
| Instruction Manual applet<br />
|-<br />
| 0x116<br />
| Notifications applet (newslist)<br />
|-<br />
| 0x117<br />
| Miiverse applet (olv)<br />
|-<br />
| 0x118<br />
| Miiverse posting applet (solv3)<br />
|-<br />
| 0x119<br />
| Amiibo settings (cabinet)<br />
|-<br />
| 0x201<br />
| Software Keyboard (swkbd) (?)<br />
|-<br />
| 0x202<br />
| Mii Selector (appletEd) (?)<br />
|-<br />
| 0x204<br />
| Photo Selector (PNOTE_AP) (?)<br />
|-<br />
| 0x205<br />
| Sound Selector (SNOTE_AP) (?)<br />
|-<br />
| 0x206<br />
| Error Display (error) (?)<br />
|-<br />
| 0x207<br />
| eShop applet (mint) (?)<br />
|-<br />
| 0x208<br />
| Circle Pad Pro Calibrator ([[Extrapad_Applet|extrapad]]) (?)<br />
|-<br />
| 0x209<br />
| Notepad (memolib) (?)<br />
|-<br />
| 0x300<br />
| Application<br />
|-<br />
| 0x301<br />
| eShop (tiger)<br />
|-<br />
| 0x401<br />
| Software Keyboard (swkbd)<br />
|-<br />
| 0x402<br />
| Mii Selector (appletEd)<br />
|-<br />
| 0x404<br />
| Photo Selector (PNOTE_AP)<br />
|-<br />
| 0x405<br />
| Sound Selector (SNOTE_AP)<br />
|-<br />
| 0x406<br />
| Error Display (error)<br />
|-<br />
| 0x407<br />
| eShop applet (mint)<br />
|-<br />
| 0x408<br />
| Circle Pad Pro Calibrator ([[Extrapad_Applet|extrapad]])<br />
|-<br />
| 0x409<br />
| Notepad (memolib)<br />
|-<br />
| 0xF10<br />
| ProgramID: 0004003000008900.<br />
|-<br />
| 0xF11<br />
| ProgramID: 000400000FFFFD00.<br />
|-<br />
| 0xF12<br />
| ProgramID: 000400000FFFFC00.<br />
|-<br />
| 0xF13<br />
| ProgramID: 000400000FFFFB00.<br />
|-<br />
| 0xF14<br />
| ProgramID: 000400000FFFF900.<br />
|-<br />
| 0xF15<br />
| ProgramID: 000400000FFFF800.<br />
|-<br />
| 0xF16<br />
| ProgramID: 000400000FFFF700.<br />
|-<br />
| 0xF17<br />
| ProgramID: 000400000FFFF600.<br />
|-<br />
| 0xF18<br />
| ProgramID: 000400000FFFF500.<br />
|}<br />
<br />
These AppIDs are all for NAND titles, except for 0x300. AppIDs in the 0x1XX range are applets(programID-high 00040030), and the AppIDs in the 0x2XX range are "system libraries"(programID-high 00040030). The 0xFXX AppID range is for development NAND applications, these are not available for retail.<br />
<br />
Note that at some point the total AppID entry count was changed from 28 to 27.</div>Reihttps://www.3dbrew.org/w/index.php?title=Multi-threading&diff=17580Multi-threading2016-06-29T19:27:14Z<p>Rei: </p>
<hr />
<div>This page is a work in progress. Put everything related to multi-threading here, threads, synchronization, multi-core support, etc.<br />
<br />
The Nintendo 3DS offers support for threading through use of [[SVC]] calls.<br />
<br />
= Processes =<br />
<br />
Each process is given an array of [[NCCH/Extended_Header#ARM11_Kernel_Capabilities|kernel capability descriptors]] upon creation (see CreateProcess). Official software forwards the descriptors specified in the [[NCCH#Extended_Header|NCCH exheader]].<br />
<br />
Any process can only use SVCs which are enabled in its kernel capability descriptors. This is enforced by the ARM11 kernel SVC handler by checking the syscall access control mask stored on the SVC-mode stack. If the SVC isn't enabled, a kernelpanic() is triggered. Each process has a separate SVC-mode stack; this stack and the syscall access mask stored here are initialized when the process is started. Applications normally only have access to SVCs <=0x3D, however not all SVCs <=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.<br />
<br />
Each process has a separate handle-table, the size of which is stored in the kernel capability descriptor. The handles in a handle-table can't be used in the context of other processes, since those handles don't exist in other handle-tables.<br />
<br />
0xFFFF8001 is a handle alias for the current process.<br />
<br />
Calling svcBreak on retail will only terminate the process which called this SVC.<br />
<br />
== Usage ==<br />
<br />
=== CreateCodeSet ===<br />
(behavior unconfirmed)<br />
<br />
Allocates memory for a process according to the given CodeSetInfo contents and copies the segment data from the given memory locations to the allocated memory.<br />
<br />
=== CreateProcess ===<br />
(behavior unconfirmed)<br />
<br />
Sets up a process using the segments managed by the given CodeSet handle.<br />
<br />
This system call furthermore processes the [[NCCH/Extended_Header#ARM11_Kernel_Capabilities|kernel capabilities]] from the [[NCCH/Extended_Header|ExHeader]], hence setting up virtual address mappings, CPU clock frequency/L2 cache configuration, and other things.<br />
<br />
=== Run ===<br />
(behavior unconfirmed)<br />
<br />
Sets up the main process thread and appends it to the scheduler queue.<br />
<br />
The argc, argv, and envp fields from the given StartupInfo structure are ignored.<br />
<br />
== struct CodeSetInfo ==<br />
All addresses are given virtual for the process to be created.<br />
All sizes are given in 0x1000-pages.<br />
<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| u8[8]<br />
| Codeset Name<br />
|-<br />
| u16<br />
| Unknown, this is written to field 0x5A of KCodeSet<br />
|-<br />
| u16<br />
| Unknown/padding<br />
|-<br />
| u32<br />
| Unknown/padding<br />
|-<br />
| u32<br />
| .text addr<br />
|-<br />
| u32<br />
| .text size<br />
|-<br />
| u32<br />
| .rodata start<br />
|-<br />
| u32<br />
| .rodata size<br />
|-<br />
| u32<br />
| RW addr (.data + .bss)<br />
|-<br />
| u32<br />
| RW size (.data + .bss)<br />
|-<br />
| u32<br />
| Total .text pages<br />
|-<br />
| u32<br />
| Total .rodata pages<br />
|-<br />
| u32<br />
| Total RW pages (.data + .bss)<br />
|-<br />
| u32<br />
| Unknown/padding<br />
|-<br />
| u8[8]<br />
| Program ID<br />
|}<br />
<br />
= Threads =<br />
<br />
For Kernel implementation details, see [[KThread]].<br />
<br />
Though it is possible to run multi-threaded programs, running those on different cores is not possible "as-is". One core is always dedicated to the OS, hence you will never get 100% of both cores.<br />
<br />
Using CloseHandle() with a KThread handle will terminate the specified thread only if the reference count reaches 0.<br />
<br />
Lower priority values give the thread higher priority. For userland apps, priorities between 0x18 and 0x3F are allowed. The priority of the app's main thread seems to be 0x30.<br />
<br />
The thread scheduler is cooperative, therefore if a thread takes up all the CPU time (for example if it enters an endless loop), all the other threads that run on the same CPU core won't get a chance to run. The main way of yielding another thread is using an address arbiter.<br />
<br />
0xFFFF8000 is a handle alias for the currently active thread.<br />
<br />
== Usage ==<br />
<br />
=== CreateThread ===<br />
'''svc''' : 0x08<br />
<br />
'''Signature'''<br />
Result CreateThread(Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid);<br />
<br />
'''Configuration'''<br />
R0=s32 threadpriority<br />
R1=func entrypoint<br />
R2=u32 arg<br />
R3=u32 stacktop<br />
R4=s32 processorid<br />
<br />
Result result=R0<br />
Handle* thread=R1<br />
<br />
'''Details'''<br />
<br />
Creates a new thread in the current process which will begin execution at the given entrypoint. The SP CPU register will be initialized to stacktop, while r0 will be initialized to the given arg.<br />
<br />
The input address used for Entrypoint_Param and StackTop are normally the same, but they may be chosen arbitrarily. For the main thread (created in svcRun), the Entrypoint_Param is value 0.<br />
<br />
The stacktop must be aligned to 0x8-bytes, otherwise when not aligned to 0x8-bytes the ARM11 kernel clears the low 3-bits of the stacktop address.<br />
<br />
The processorid parameter specifies which processor the thread can run on. Non-negative values correspond to a specific CPU. (e.g. 0 for the Appcore and 1 for the Syscore on Old3DS) Special value -1 means all CPUs, and -2 means the default CPU for the process (Read from the [[NCCH/Extended Header|Exheader]], usually 0 for applications, 1 for system services). Games usually create threads using -2.<br />
<br />
The thread priority value must be in the range 0x0..0x3F. Otherwise, error 0xE0E01BFD is returned.<br />
<br />
With the Old3DS kernel, the s32 processorid must be <=2 (for the processorid validation check in the kernel). With the New3DS kernel, the processorid validation check requires processorid to be less than or equal to <total cores(MPCore "SCU Configuration Register" CPU number value + 1)>, and a number of additional constraints apply: When processorid==0x2 and the process is not a BASE mem-region process, exheader kernel-flags bitmask 0x2000 must be set (otherwise error 0xD9001BEA is returned). When processorid==0x3 and the process is not a BASE mem-region process, error 0xD9001BEA is returned. These are the only restriction checks done by the kernel for processorid.<br />
<br />
=== ExitThread ===<br />
'''svc''' : 0x09<br />
<br />
'''Signature'''<br />
void ExitThread(void);<br />
<br />
=== SleepThread ===<br />
'''svc''' : 0x0A<br />
<br />
'''Signature'''<br />
void SleepThread(s64 nanoseconds);<br />
<br />
=== GetThreadPriority ===<br />
'''svc''' : 0x0B<br />
<br />
'''Signature'''<br />
Result GetThreadPriority(s32* priority, Handle thread);<br />
<br />
'''asm'''<br />
.global svcGetThreadPriority<br />
.type svcGetThreadPriority, %function<br />
svcGetThreadPriority:<br />
str r0, [sp, #-0x4]!<br />
svc 0x0B<br />
ldr r3, [sp], #4<br />
str r1, [r3]<br />
bx lr<br />
<br />
=== SetThreadPriority ===<br />
'''svc''' : 0x0C<br />
<br />
'''Signature'''<br />
Result SetThreadPriority(Handle thread, s32 priority);<br />
<br />
=== OpenThread ===<br />
'''svc''' : 0x34<br />
<br />
'''Signature'''<br />
Result OpenThread(Handle* thread, Handle process, u32 threadId);<br />
<br />
=== GetProcessIdOfThread ===<br />
'''svc''' : 0x36<br />
<br />
'''Signature'''<br />
Result GetProcessIdOfThread(u32* processId, Handle thread);<br />
<br />
=== GetThreadId ===<br />
'''svc''' : 0x37<br />
<br />
'''Signature'''<br />
Result GetThreadId(u32* threadId, Handle thread);<br />
<br />
'''Details'''<br />
It seems that only the thread itself or one of its parent can get the ID. Calling this on the handle of a sibling or parent seems to always yield the ID 0.<br />
<br />
=== GetThreadInfo ===<br />
'''svc''' : 0x2C<br />
<br />
'''Signature'''<br />
Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type);<br />
<br />
''' Details '''<br />
This requests always return an error when called, it only checks if the handle is a thread or not. <br />
Hence, it will return 0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle, 0xD8E007F7 (BAD_HANDLE) if it isn't.<br />
<br />
=== GetThreadContext ===<br />
'''svc''' : 0x3B<br />
<br />
'''Signature'''<br />
Result GetThreadContext(ThreadContext* context, Handle thread);<br />
<br />
'''Details'''<br />
Stubbed?<br />
<br />
== Core affinity == <br />
<br />
The cores are numbered from 0 to 1 for Old 3DS and 0 to 3 for the new 3DS.<br />
<br />
=== GetThreadAffinityMask ===<br />
'''svc''' : 0x0D<br />
<br />
'''Signature'''<br />
Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount);<br />
<br />
=== SetThreadAffinityMask ===<br />
'''svc''' : 0x0E<br />
<br />
'''Signature'''<br />
Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount);<br />
<br />
=== GetThreadIdealProcessor ===<br />
'''svc''' : 0x0F<br />
<br />
'''Signature'''<br />
Result GetThreadIdealProcessor(s32* processorid, Handle thread);<br />
<br />
=== SetThreadIdealProcessor ===<br />
'''svc''' : 0x10<br />
<br />
=== APT:SetApplicationCpuTimeLimit ===<br />
<br />
See [[APT:SetApplicationCpuTimeLimit]].<br />
<br />
You are not able to use the system core (core1) by default. You have to first assign the amount of time dedicated to the system.<br />
The value is in percent, the higher it is, the more the system will be available for your application. <br />
<br />
For example if you set this value to 25%, it means that your application will be able to use 25% of the system core at most, even if you never issue system calls.<br />
<br />
If you set the value to a non-zero value, you will not be able to set it back to 0%.<br />
Keep in mind that if your application is heavily dependant on the system, setting a high value for your application might yield poorer performance than if you had set a low value.<br />
<br />
=== APT:GetApplicationCpuTimeLimit ===<br />
<br />
See [[APT:GetApplicationCpuTimeLimit]].<br />
<br />
== Debug == <br />
<br />
=== GetThreadList ===<br />
<br />
=== GetDebugThreadContext ===<br />
<br />
=== SetDebugThreadContext ===<br />
<br />
=== GetDebugThreadParam ===<br />
<br />
= Synchronization =<br />
<br />
Synchronization can be performed via WaitSynchronization on any handles deriving from [[KSynchronizationObject]]. The semantic meaning of the call depends on the particular object type referred to by the given handle:<br />
<br />
* KClientPort: Wakes if max sessions not reached (free session available)<br />
* KClientSession: Always false?<br />
* KDebug: ???<br />
* KDmaObject: ???<br />
* KEvent: Waits until the event is signaled<br />
* KInterruptEvent: ???<br />
* KMutex: Acquires a lock on the mutex (blocks until this succeeds)<br />
* KProcess: Waits until the process exits<br />
* KSemaphore: This consumes a value from the semaphore count, if possible, otherwise continues to wait<br />
* KServerPort: Waits for a new client connection, upon which svcAcceptSession is ready to be called<br />
* KServerSession: Waits for an IPC command to be submitted to the server process<br />
* KThread: Waits until the thread terminates<br />
* KTimer: Wakes when timer activates (this also clears the timer if it is oneshot)<br />
<br />
Most synchronization systems seem to have both a "normal" and "light-weight" version<br />
<br />
== Mutex (normal) ==<br />
<br />
For Kernel implementation details, see [[KMutex]]<br />
<br />
=== CreateMutex ===<br />
<br />
/!\ It seems that the mutex will not be available once the thread that created it is destroyed <br />
<br />
=== ReleaseMutex ===<br />
<br />
== Ciritical Section (light-weight mutex) ==<br />
<br />
Similar to a mutex, but faster and no priority inheritance. Therefore problems such as priority inversion may occur.<br />
<br />
=== CriticalSection::Initialize ===<br />
<br />
Creates an object<br />
<br />
=== CriticalSection::Enter ===<br />
<br />
Locks out threads from accessing a critical section.<br />
<br />
=== CriticalSection::Leave ===<br />
<br />
Unlocks and allows for access to a critical section.<br />
<br />
== Semaphore ==<br />
<br />
== Light Semaphore ? ==<br />
<br />
Does it exist ?<br />
<br />
== Event ==<br />
<br />
== Light Event ==<br />
<br />
== Address Arbiters ==<br />
<br />
Address arbiters are a low-level primitive to implement synchronization based on a counter stored at some user-specified virtual memory address. Address arbiters are used to put the current thread to sleep until the counter is signaled. Both of these tasks are implemented in ArbitrateAddress.<br />
<br />
Address arbiters are implemented by [[KAddressArbiter]].<br />
<br />
===CreateAddressArbiter===<br />
Result CreateAddressArbiter(Handle* arbiter)<br />
<br />
Creates an address arbiter handle for use with ArbitrateAddress.<br />
<br />
=== ArbitrateAddress ===<br />
Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value, s64 nanoseconds)<br />
<br />
if <code>type</code> is SIGNAL, the ArbitrateAddress call will resume up to <code>value</code> of the threads waiting on <code>addr</code> using an arbiter, starting with the highest-priority threads. If <code>value</code> is negative, all of these threads are released. <code>nanoseconds</code> remains unused in this mode.<br />
<br />
The other modes are used to (conditionally) put the current thread to sleep based on the memory word at virtual address <code>addr</code> until another thread signals that address using ArbitrateAddress with the <code>type</code> SIGNAL. WAIT_IF_LESS_THAN will put the current thread to sleep if that word is smaller than <code>value</code>. DECREMENT_AND_WAIT_IF_LESS_THAN will furthermore decrement the memory value before the comparison. WAIT_IF_LESS_THAN_TIMEOUT and DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT will do the same as their counterparts, but will have thread execution resume if <code>nanoseconds</code> nanoseconds pass without <code>addr</code> being signaled.<br />
<br />
=== enum ArbitrationType ===<br />
{| class="wikitable" border="1"<br />
! Address arbitration type<br />
! Value<br />
|-<br />
| SIGNAL<br />
| 0<br />
|-<br />
| WAIT_IF_LESS_THAN<br />
| 1<br />
|-<br />
| DECREMENT_AND_WAIT_IF_LESS_THAN<br />
| 2<br />
|-<br />
| WAIT_IF_LESS_THAN_TIMEOUT<br />
| 3<br />
|-<br />
| DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT<br />
| 4<br />
|}</div>Reihttps://www.3dbrew.org/w/index.php?title=ACT:Initialize&diff=17545ACT:Initialize2016-06-17T03:36:49Z<p>Rei: Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x00010084] |- | 1 | SDK Version |- | 2 | Shared memory size |- | 3 | Always 0x..."</p>
<hr />
<div>=Request=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code [0x00010084]<br />
|-<br />
| 1<br />
| SDK Version<br />
|-<br />
| 2<br />
| Shared memory size<br />
|-<br />
| 3<br />
| Always 0x20(kernel PID header)<br />
|-<br />
| 4<br />
| 0x20(The code to request the current process handle.)<br />
|-<br />
| 5<br />
| 0x00 (handle-transfer header for kernel)<br />
|-<br />
| 6<br />
| Shared memory address value.<br />
|}<br />
<br />
=Response=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code<br />
|-<br />
| 1<br />
| Result code<br />
|}<br />
<br />
=Description=<br />
This initializes the ACT service. Shared memory initialization is optional, but some service calls require it.</div>Reihttps://www.3dbrew.org/w/index.php?title=ACT_Services&diff=17544ACT Services2016-06-17T03:23:36Z<p>Rei: /* ACT service "act:u" */</p>
<hr />
<div>[[Category:Services]]<br />
<br />
The ACT module handles NNID accounts.<br />
<br />
= ACT service "act:u" =<br />
These commands are common to both act:u and act:a<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system-version<br />
! Description<br />
|-<br />
| 0x00010084<br />
| <br />
| [[ACT:Initialize|Initialize]]<br />
|-<br />
| 0x00020040<br />
| <br />
| GetErrorCode<br />
|-<br />
| 0x000600C2<br />
| <br />
| [[ACTU:GetAccountDataBlock|GetAccountDataBlock]]<br />
|-<br />
| 0x000B0042<br />
|<br />
| AcquireEulaList<br />
|-<br />
| 0x000D0040<br />
| <br />
| GenerateUuid<br />
|}<br />
<br />
= ACT service "act:a" =<br />
These commands are exclusive to act:a<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system-version<br />
! Description<br />
|-<br />
| 0x041300C2<br />
| <br />
| UpdateMiiImage<br />
|-<br />
| 0x041B0142<br />
| <br />
| AgreeEula<br />
|-<br />
| 0x04210042<br />
| <br />
| UploadMii<br />
|-<br />
| 0x04230082<br />
| <br />
| ValidateMailAddress<br />
|}<br />
<br />
<br />
This is the service used by regular applications.<br />
<br />
=HTTPS Requests=<br />
<br />
With each request, ACT-sysmodule specifies request-header "X-Nintendo-Device-Model". This is the only *dedicated* request-header that's contains anything Old3DS/New3DS specific. This was implemented with [[9.0.0-20|9.0.0-X]], and presumably [[8.1.0-0_New3DS]]. The value is from a string initialized during ACT-sysmodule startup. The value-string is the [[Cfg:GetSystemModel|codename]] string for all 5 of the model values from [[Cfg:GetSystemModel]]. When the output from GetSystemModel is >=5(switch statement default case), it runs this: "len = snprintf(outstr, outmaxsize, "3DS-%u", model);"<br />
<br />
==Trusted Root CAs==<br />
ACT module uses a [[HTTP_Services|RootCertChain]] for all HTTPS requests, the only trusted root CA is [[SSLC:RootCertChainAddDefaultCert|default]] CertID 0x3.<br />
<br />
=New3DS=<br />
Even though ACT-sysmodule uses [[PTM_Services|ptm:s]], it doesn't use CheckNew3DS at all.</div>Reihttps://www.3dbrew.org/w/index.php?title=ACTU:GetAccountDataBlock&diff=17543ACTU:GetAccountDataBlock2016-06-17T02:46:38Z<p>Rei: </p>
<hr />
<div>=Request=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code [0x000600C2]<br />
|-<br />
| 1<br />
| Unknown, usually 0xFE?<br />
|-<br />
| 2<br />
| Size<br />
|-<br />
| 3<br />
| BlkID<br />
|-<br />
| 4<br />
| (Size<<4) <nowiki>|</nowiki> 12<br />
|-<br />
| 5<br />
| Output buffer ptr<br />
|}<br />
<br />
=Response=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code<br />
|-<br />
| 1<br />
| Result code<br />
|}<br />
<br />
=Description=<br />
This returns NNID account info.<br />
<br />
=DataBlocks=<br />
{| class="wikitable" border="1"<br />
|-<br />
! BlkID<br />
! Size<br />
! Description<br />
|-<br />
| 0x8<br />
| 0x11<br />
| ASCII NUL-terminated Nintendo Network ID<br />
|-<br />
| 0xB<br />
| 0x3<br />
| ASCII NUL-terminated Country Name<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Principal ID<br />
|-<br />
| 0x13<br />
| 0x1<br />
| ?<br />
|-<br />
| 0x19<br />
| 0x8<br />
| ?<br />
|-<br />
| 0x1E<br />
| 0x41<br />
| ASCII Time Zone Location<br />
|-<br />
| 0x2C<br />
| 0x2<br />
| Age<br />
|-<br />
| 0x2F<br />
| 0x4<br />
| [[Config_Savegame#CountryInfo|CountryInfo]]<br />
|}</div>Reihttps://www.3dbrew.org/w/index.php?title=NIM_Services&diff=17445NIM Services2016-05-31T18:25:06Z<p>Rei: </p>
<hr />
<div>[[Category:Services]]<br />
= NIM user service "nim:u" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010000<br />
| Related to starting a sysupdate?<br />
|-<br />
| 0x00020000<br />
| [[NIMU:GetUpdateDownloadProgress|GetUpdateDownloadProgress]]<br />
|-<br />
| 0x0003....<br />
| ?<br />
|-<br />
| 0x00040000<br />
| [[NIMU:FinishTitlesInstall|FinishTitlesInstall]]<br />
|-<br />
| 0x00050000<br />
| This obtains an event handle. Home Menu will check whether a system update is available when this event is triggered.<br />
|-<br />
| 0x0006....<br />
| ?<br />
|-<br />
| 0x0007....<br />
| ?<br />
|-<br />
| 0x0008....<br />
| ?<br />
|-<br />
| 0x00090000<br />
| [[NIMU:CheckSysupdateAvailable|CheckSysupdateAvailable]]<br />
|-<br />
| 0x000A0000<br />
| GetState<br />
|-<br />
| 0x000B0000<br />
| [[NIMU:GetSystemTitleHash|GetSystemTitleHash]]<br />
|-<br />
| 0x000C0082<br />
| ?<br />
|-<br />
| 0x000F0042<br />
| ?<br />
|-<br />
| 0x00110000<br />
| ?<br />
|-<br />
| 0x00130000<br />
| ?<br />
|-<br />
| 0x00140000<br />
| ?<br />
|-<br />
| 0x00150000<br />
| ?<br />
|-<br />
| 0x00170042<br />
| ?<br />
|-<br />
| 0x00180080<br />
| ?<br />
|-<br />
| 0x00250000<br />
| ?<br />
|-<br />
| 0x00260200<br />
| ?<br />
|-<br />
| 0x00270000<br />
| ?<br />
|-<br />
| 0x00280000<br />
| ?<br />
|-<br />
| 0x00290246<br />
| ?<br />
|-<br />
| 0x002A0000<br />
| ?<br />
|-<br />
| 0x002B0000<br />
| ?<br />
|-<br />
| 0x002C0000<br />
| ?<br />
|-<br />
| 0x002D00C0<br />
| ?<br />
|-<br />
| 0x00480002<br />
| ?<br />
|}<br />
<br />
= NIM server service "nim:s" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00060080<br />
| The input at cmdreq[1-2] is an u64 titleID. This writes an u8 to cmdreply[2]. It's unknown what exactly the [[eShop]] application uses this for, it only uses this command for apps which are installed(checked via [[Application_Manager_Services|AM]] probably). In those cases, it seems the outval for this command(with result-code=0) is normally 0?<br />
|-<br />
| 0x000A0000<br />
| [[NIMS:CheckSysupdateAvailableSOAP|CheckSysupdateAvailableSOAP]]<br />
|-<br />
| 0x0016020A<br />
| [[NIMS:ListTitles|ListTitles]]<br />
|-<br />
| 0x0022....<br />
| AccountDeleteTitleETicketsSOAP. The SOAP request is sent only after the ticket for the specified titleID has been successfully deleted.<br />
|-<br />
| 0x002D0042<br />
| [[NIMS:DownloadTickets|DownloadTickets]]<br />
|-<br />
| 0x00420240<br />
| [[NIMS:StartDownload|StartDownload]]<br />
|}<br />
<br />
= NIM server service "nim:aoc" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00030042<br />
| SetApplicationId<br />
|-<br />
| 0x00040042<br />
| SetTin<br />
|-<br />
| 0x000902D0<br />
| ListContentSetsEx<br />
|-<br />
| 0x00180000<br />
| GetBalance<br />
|-<br />
| 0x001D0000<br />
| GetCustomerSupportCode<br />
|-<br />
| 0x00210000<br />
| Initialize<br />
|-<br />
| 0x00240282<br />
| CalculateContentsRequiredSize<br />
|-<br />
| 0x00250000<br />
| RefreshServerTime<br />
|}<br />
<br />
= NIM service "nim:ndm" =<br />
<br />
= kagiya server =<br />
The nim system module communicates with a server called kagiya (kagiya-ctr.cdn.nintendo.net or kagiya-dev-ctr.cdn.nintendo.net for development units). It provides the 9.6 crypto seed in binary form for any given title ID under (HTTPS) kagiya-ctr.cdn.nintendo.net/title/0x%16llx/ext_key?country=%s, where %16llx is the title ID and %s is a country code as used in the [[EShop|eShop]].<br />
<br />
=New3DS=<br />
NIM module only uses [[PTMSYSM:CheckNew3DS|CheckNew3DS]] for determining what heap sizes to use, in two functions. One is for the size of the 0x08000000 vmem heap, the other is probably for some buffer allocated on that heap. The New3DS version of these sizes are 0x1C000-bytes larger than the Old3DS sizes here.<br />
<br />
=HTTPS requests=<br />
<br />
==Trusted RootCAs==<br />
During startup NIM-module creates two RootCertChains with [[HTTP_Services|HTTPC]]. Both of these only contain the same [[HTTPC:RootCertChainAddDefaultCert|default]] cert with ID 0x3. The first RootCertChain is used with NetUpdateSOAP. Requests such as the "notifications.json" page don't use these RootCertChains(in this case just [[HTTPC:AddDefaultCert|default]] certID 0xB is used).<br />
<br />
==SOAP==<br />
<br />
===NetUpdateSOAP===<br />
There are exactly 3 types of network SOAP requests used with [https://nus.c.shop.nintendowifi.net/nus/services/NetUpdateSOAP NetUpdateSOAP] by NIM module, described below. This URL contained in NIM module itself is only used with GetSystemTitleHash. The other requests use an identical URL loaded from an ECommerceSOAP response instead.<br />
<br />
See also [https://github.com/yellows8/ninupdates here].<br />
<br />
====GetSystemUpdate====<br />
Returns the current sysupdate title-listing. This also contains the SystemTitleHash returned by GetSystemTitleHash.<br />
<br />
====GetSystemTitleHash====<br />
Returns the current SystemTitleHash for the current sysupdate title-listing.<br />
<br />
====GetSystemCommonETicket====<br />
Returns the Base64-encoded cetk for each specified TitleId entry.<br />
<br />
This is only used when installing new titles. This means with CDN system-updates, tickets are never installed except when a title is being installed for the first time. For example, a system on the latest system-version that was only ever updated via CDN has the same NATIVE_FIRM ticket installed from the factory.<br />
<br />
=Sysupdate checking process=<br />
This section describes the process used when checking whether a sysupdate is required.<br />
<br />
First the GetSystemTitleHash SOAP request is done. Then the SystemTitleHash in savedata hash.dat is compared with the received one. If they match and the SystemTitleHash flag is set to value 0x03, it will immediately return that no sysupdate is required. Otherwise it will start the GetSystemUpdate SOAP request handling.<br />
<br />
The GetSystemUpdate SOAP request contains a titlelist of all NAND system-titles. For GetSystemUpdate response parsing, it compares each SOAP title_entry with the NAND system titlelist. If a SOAP titleID isn't found in the NAND titlelist, this means NAND is missing a new title and hence a sysupdate is required for installing that title. If a NAND title_entry-version is less than the SOAP title_entry-version, this means the title needs updated and hence a sysupdate is required.<br />
<br />
At least one <TitleVersion> entry with valid data in the GetSystemUpdate response is required.<br />
<br />
The titleIDs sent in the GetSystemUpdate SOAP request are decimal, while the titleIDs in the response are hex.<br />
<br />
=NIM [[System_SaveData]]=<br />
==hash.dat==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x60<br />
| 0x1<br />
| u8 flag used with the SystemTitleHash. 0x01 = latest sysupdate isn't installed as of last SOAP requests, 0x03 = latest sysupdate is installed as of last SOAP requests.<br />
|-<br />
| 0x61<br />
| 0x21<br />
| ASCII hex SystemTitleHash, including NUL-terminator. This is the latest SystemTitleHash which NIM module received from SOAP.<br />
|}</div>Reihttps://www.3dbrew.org/w/index.php?title=BOSS_Services&diff=17444BOSS Services2016-05-31T01:30:43Z<p>Rei: </p>
<hr />
<div>==BOSS Service "boss:U"==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010082<br />
| InitializeSession<br />
|-<br />
| 0x00020100<br />
| GetStorageInfo<br />
|-<br />
| 0x00030000<br />
| unknown...<br />
|-<br />
| 0x00040000<br />
| unknown...<br />
|-<br />
| 0x00090040<br />
| unknown...<br />
|-<br />
| 0x000A0000<br />
| unknown...<br />
|-<br />
| 0x000E0000<br />
| unknown...<br />
|-<br />
| 0x000C0082<br />
| UnregisterTask<br />
|-<br />
| 0x00100102<br />
| unknown...<br />
|-<br />
| 0x00140082<br />
| unknown...<br />
|-<br />
| 0x00160082<br />
| unknown...<br />
|-<br />
| 0x001C0042<br />
| StartTask<br />
|-<br />
| 0x001D0042<br />
| unknown...<br />
|-<br />
| 0x001E0042<br />
| CancelTask<br />
|-<br />
| 0x001F0000<br />
| unknown...<br />
|-<br />
| 0x00200082<br />
| unknown...<br />
|-<br />
| 0x00210042<br />
| GetTaskResult<br />
|-<br />
| 0x002300C2<br />
| GetTaskStatus<br />
|-<br />
| 0x00260040<br />
| unknown...<br />
|-<br />
| 0x002700C2<br />
| unknown...<br />
|-<br />
| 0x00280102<br />
| unknown...<br />
|-<br />
| 0x002D0040<br />
| unknown...<br />
|-<br />
| 0x002C0040<br />
| unknown...<br />
|-<br />
| 0x002E0040<br />
| GetErrorCode<br />
|-<br />
| 0x002F0140<br />
| unknown...<br />
|-<br />
| 0x00300000<br />
| unknown...<br />
|-<br />
| 0x00330042<br />
| StartBgImmediate<br />
|-<br />
| 0x003500C2<br />
| unknown...<br />
|-<br />
| 0x00360084<br />
| unknown...<br />
|}<br />
<br />
==Privileged BOSS Service "boss:P"==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x04040080<br />
| unknown...<br />
|-<br />
| 0x040500C0<br />
| unknown...<br />
|-<br />
| 0x040600C0<br />
| unknown...<br />
|-<br />
| 0x04070080<br />
| unknown...<br />
|-<br />
| 0x04090102<br />
| unknown...<br />
|-<br />
| 0x040B0080<br />
| unknown...<br />
|-<br />
| 0x040D0182<br />
| unknown...<br />
|-<br />
| 0x041500C0<br />
| unknown...<br />
|-<br />
| 0x04160142<br />
| unknown...<br />
|-<br />
| 0x04170182<br />
| unknown...<br />
|-<br />
| 0x041C00C0<br />
| unknown...<br />
|-<br />
| 0x042E00C2<br />
| unknown...<br />
|-<br />
| 0x042F00C2<br />
| unknown...<br />
|-<br />
| 0x043000C2<br />
| unknown...<br />
|-<br />
| 0x04490142<br />
| unknown...<br />
|-<br />
| 0x044A0180<br />
| unknown...<br />
|-<br />
| 0x044D0080<br />
| unknown...<br />
|-<br />
| 0x04500102<br />
| unknown...<br />
|-<br />
| 0x04540102<br />
| unknown...<br />
|-<br />
| 0x045500C2<br />
| unknown...<br />
|}<br />
<br />
boss:P also contains all of the commands from boss:U.</div>Reihttps://www.3dbrew.org/w/index.php?title=Configuration_Memory&diff=17433Configuration Memory2016-05-26T11:38:49Z<p>Rei: </p>
<hr />
<div>= ARM11 Kernel Configuration Memory =<br />
{| class="wikitable" border="1"<br />
! NAME<br />
! PROCESS VIRTUAL ADDRESS<br />
! WIDTH<br />
|-<br />
| KERNEL_?<br />
| 0x1FF80000<br />
| 1<br />
|-<br />
| KERNEL_VERSIONREVISION<br />
| 0x1FF80001<br />
| 1<br />
|-<br />
| KERNEL_VERSIONMINOR<br />
| 0x1FF80002<br />
| 1<br />
|-<br />
| KERNEL_VERSIONMAJOR<br />
| 0x1FF80003<br />
| 1<br />
|-<br />
| UPDATEFLAG<br />
| 0x1FF80004<br />
| 4<br />
|-<br />
| NSTID<br />
| 0x1FF80008<br />
| 8<br />
|-<br />
| SYSCOREVER<br />
| 0x1FF80010<br />
| 4<br />
|-<br />
| UNITINFO<br />
| 0x1FF80014<br />
| 1<br />
|-<br />
| BOOT_FIRM<br />
| 0x1FF80015<br />
| 1<br />
|-<br />
| PREV_FIRM<br />
| 0x1FF80016<br />
| 1<br />
|-<br />
| KERNEL_CTRSDKVERSION<br />
| 0x1FF80018<br />
| 4<br />
|-<br />
| APPMEMTYPE<br />
| 0x1FF80030<br />
| 4<br />
|-<br />
| APPMEMALLOC<br />
| 0x1FF80040<br />
| 4<br />
|-<br />
| SYSMEMALLOC<br />
| 0x1FF80044<br />
| 4<br />
|-<br />
| BASEMEMALLOC<br />
| 0x1FF80048<br />
| 4<br />
|-<br />
| FIRM_?<br />
| 0x1FF80060<br />
| 1<br />
|-<br />
| FIRM_VERSIONREVISION<br />
| 0x1FF80061<br />
| 1<br />
|-<br />
| FIRM_VERSIONMINOR<br />
| 0x1FF80062<br />
| 1<br />
|-<br />
| FIRM_VERSIONMAJOR<br />
| 0x1FF80063<br />
| 1<br />
|-<br />
| FIRM_SYSCOREVER<br />
| 0x1FF80064<br />
| 4<br />
|-<br />
| FIRM_CTRSDKVERSION<br />
| 0x1FF80068<br />
| 4<br />
|}<br />
<br />
This memory page is [[Memory_layout|read-only]] for ARM11 processes. This memory and the kernel code for it only exists under NATIVE_FIRM/SAFE_MODE_FIRM.<br />
<br />
The FIRM_* fields are by default identical to the KERNEL_* fields. However, the FIRM_* fields can be overridden via FIRM-launch parameters, see [[FIRM|here]].<br />
<br />
Besides mem-region related fields, the data written here by the old 3DS/new 3DS kernels is identical.<br />
<br />
= Shared Memory Page For ARM11 Processes =<br />
{| class="wikitable" border="1"<br />
! NAME<br />
! PROCESS VIRTUAL ADDRESS<br />
! WIDTH<br />
|-<br />
| bit0 selects DATETIME_0 or DATETIME_1.<br />
| 0x1FF81000<br />
| 4<br />
|-<br />
| RUNNING_HW (1=product, 2=devboard, 3=debugger, 4=capture)<br />
| 0x1FF81004<br />
| 1<br />
|-<br />
| MCU_HW_INFO<br />
| 0x1FF81005<br />
| 1<br />
|-<br />
| DATETIME_0 {(u64)MillisecondsSinceFirstJan1900,(u64)SystemTickLastTimeThisWasUpdated,(u32)unk,(u32)unk,(u32)unk,(u32)unk}<br />
| 0x1FF81020<br />
| 32<br />
|-<br />
| DATETIME_1<br />
| 0x1FF81040<br />
| 32<br />
|-<br />
| WIFI_MACADDR<br />
| 0x1FF81060<br />
| 6<br />
|-<br />
| WIFI_LINKLEVEL Ranges from 0-3; 0 stands for no or a poor network connection; 3 stands for a good connection. This corresponds with the number of wifi bars displayed by [[Home Menu]].<br />
| 0x1FF81066<br />
| 1<br />
|-<br />
| WIFI_? Likely wifi hardware related, NWM module initializes this. Regular Old3DS value = 0x00, regular New3DS value = 0x02.<br />
| 0x1FF81067<br />
| 1<br />
|-<br />
| 3D_SLIDERSTATE<br />
| 0x1FF81080<br />
| 4<br />
|-<br />
| 3D_LEDSTATE<br />
| 0x1FF81084<br />
| 1<br />
|-<br />
| BATTERY_LEDSTATE<br />
| 0x1FF81085<br />
| 1<br />
|-<br />
| On startup, and under certain conditions, NS will continuously call svcSleepThread(1000*1000) as long as bit0 of this field is clear. ptmInitialize() sets this after writing MCU unit info to sharedmem.<br />
| 0x1FF81086<br />
| 1<br />
|-<br />
| MENUTID<br />
| 0x1FF810A0<br />
| 8<br />
|-<br />
| ACTIVEMENUTID<br />
| 0x1FF810A8<br />
| 8<br />
|-<br />
| Signed? Headsets connected?<br />
| 0x1FF810C0<br />
| 1<br />
|}<br />
<br />
This memory page is normally read-only for ARM11 processes, write-access is [[Memory_layout|determined]] by the process exheader kernel "shared page writing" flag. This memory only exists under NATIVE_FIRM/SAFE_MODE_FIRM.<br />
<br />
= ARM11 Kernel Config Fields =<br />
<br />
== 0x1FF80000 / 0x1FF80060 ==<br />
Unknown, this is normally value 0.<br />
<br />
== KERNEL_VERSIONREVISION / FIRM_VERSIONREVISION ==<br />
This is the version-revision for the currently running [[FIRM]].<br />
<br />
== KERNEL_VERSIONMINOR ==<br />
This is the version-minor from ((title-version & 0x3FF) >> 4), for the currently running [[FIRM]]. The values from KERNEL_VERSIONMINOR and KERNEL_VERSIONMAJOR can be stored in applications' [[NCCH#CXI|CXI]] exheader.<br />
<br />
== FIRM_VERSIONMINOR ==<br />
This is the same as KERNEL_VERSIONMINOR. After [[AM:InstallNATIVEFIRM]] checks FIRM_SYSCOREVER, [[AM:InstallNATIVEFIRM]] then compares FIRM_VERSIONMINOR with the NATIVE_FIRM ((title-version & 0x3FF) >> 4), when the latter is larger than FIRM_VERSIONMINOR [[AM:InstallNATIVEFIRM]] will trigger a [[FIRM]] install.<br />
<br />
== KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR ==<br />
This is the version-major for the currently running [[FIRM]].<br />
<br />
== UPDATEFLAG ==<br />
Normally this flag is zero. When the ARM11 kernel is booting on non-factory FIRM it will set this flag to 1, when bit0 from the data which field 0x1FF80016 is loaded from is clear, if the following [[PAD]] buttons are pressed: L, R, A, Up. When this flag is set, [[NS]] will launch the [[System_Settings#System_Updater|System Updater]] title instead of [[Home Menu]].<br />
<br />
== NSTID ==<br />
This field contains the titleID of the first title to launch from CTR-NAND after the [[FIRM]] system processes are loaded. The [[Process_Manager_Services|PM]] module launches this title. If this field titleID is all-zero, the system will not attempt to launch the title. The regular ARM11 kernel sets this to the regular [[NS]] titleID, while the SAFE_MODE ARM11 kernel sets this to the SAFE_MODE NS titleID. The factory FIRM ARM11-kernel sets this to the NS TID from [[Factory_Setup|here]].<br />
<br />
== SYSCOREVER ==<br />
This field is initialized by the ARM11 kernel, this is the programID-low of the running FIRM. When launching [[NCCH#CXI|CXIs]], the value stored here must match the core version field stored in the CXI exheader. If they do not match, the [[Process_Manager_Services|PM]] module will refuse to launch the ARM11 process.<br />
<br />
With [[Factory_Setup|factory]] NATIVE_FIRM, this is set to 0x0, even though the FIRM programID-low is 0x2. However, the factory system-titles have core-version set to 0x2. Hence, this config-mem SYSCOREVER field might not be used by factory system processes?<br />
<br />
== FIRM_SYSCOREVER ==<br />
Normally this is the same as SYSCOREVER. This used by [[AM:InstallNATIVEFIRM]] for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, [[AM:InstallNATIVEFIRM]] will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, [[AM:InstallNATIVEFIRM]] will return an error.<br />
<br />
== UNITINFO ==<br />
{| class="wikitable" border="1"<br />
! Bit<br />
! Description<br />
|-<br />
| 0<br />
| Clear for developer unit, set for retail.(See 0x1FF80015)<br />
|-<br />
| 1<br />
| IsJtagConnected<br />
|-<br />
| 2-7<br />
|?<br />
|}<br />
<br />
Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set. [[NS]] loads the menu TID from MENUTID when bits 1-7 of this field are clear. [[ErrDisp]] will display development error info when bit0 is clear.<br />
<br />
== 0x1FF80015 ==<br />
{| class="wikitable" border="1"<br />
! Value<br />
! Boot Env<br />
|-<br />
| 0<br />
| Prod<br />
|-<br />
| 1<br />
| Dev<br />
|-<br />
| 2<br />
| Debugger<br />
|-<br />
| 3<br />
| Firm<br />
|}<br />
<br />
The ARM11 loads this value from 0x1FFFFFF0+1 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.<br />
<br />
When this field is zero, bit0 for UNITINFO is set for retail. When this field is non-zero, bit0 for UNITINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set. JTAG is only enabled for debugger and "firm" modes (bit1).<br />
<br />
== 0x1FF80016 ==<br />
{| class="wikitable" border="1"<br />
! Value<br />
! Description<br />
|-<br />
| 0<br />
| Cold Boot<br />
|-<br />
| 1<br />
| Reset from CTR mode<br />
|-<br />
| 3<br />
| Reset from TWL mode<br />
|-<br />
| 5<br />
| Reset from NTR mode<br />
|-<br />
| 7<br />
| Reset from AGB mode<br />
|}<br />
<br />
The ARM11 loads this value from 0x1FFFFFF0+2 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.<br />
<br />
This originates from the low 8-bits of register [[CONFIG|0x10010000]]. When bit0 is set, the ARM11 kernel will not set the UPDATEFLAG to value 1.<br />
<br />
== KERNEL_CTRSDKVERSION / FIRM_CTRSDKVERSION ==<br />
This is the CTR-SDK version which was used to build the currently running [[FIRM]].<br />
<br />
== APPMEMTYPE ==<br />
The value of this field determines the size for APPMEMALLOC. The retail type(value0) is used when the type is not values 2-5. See [[Memory_layout]] for the table of values for this and the mem-region sizes.<br />
<br />
== APPMEMALLOC ==<br />
This contains the total size of the memory that can be allocated with the APPLICATION [[SVC|memory-region]], see [[Memory_layout|here]].<br />
<br />
== SYSMEMALLOC ==<br />
Same as APPMEMALLOC except for the SYSTEM mem-region, see [[Memory_layout|here]].<br />
<br />
== BASEMEMALLOC ==<br />
Same as APPMEMALLOC except for the BASE mem-region, see [[Memory_layout|here]].<br />
<br />
= Shared Memory Page Fields =<br />
<br />
== WIFI_MACADDR ==<br />
This is the WiFi MAC address for the 3DS. This is initialized by the [[NWM_Services|NWM]] module, it's unknown where the MAC address written here was originally loaded from.<br />
<br />
== 3D_SLIDERSTATE ==<br />
This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max.<br />
<br />
This is written/updated by [[HID_Services|HID]] module.<br />
<br />
== 3D_LEDSTATE ==<br />
When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]].<br />
<br />
== MENUTID ==<br />
Unknown, contains the menu TID (used by [[NS]])<br />
<br />
== ACTIVEMENUTID ==<br />
This contains the titleID of the currently running menu launched by [[NS]].<br />
<br />
= NATIVE_FIRM Versions =<br />
<br />
See [[FIRM#NATIVE_FIRM|FIRM]].</div>Reihttps://www.3dbrew.org/w/index.php?title=Config_Services&diff=17165Config Services2016-04-25T01:27:54Z<p>Rei: </p>
<hr />
<div>[[Category:Services]]<br />
<br />
= Config Services =<br />
These commands are common to all Config services.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version<br />
! Description<br />
|-<br />
| 0x00010082<br />
| <br />
| [[CfgS:GetConfigInfoBlk2|GetConfigInfoBlk2]]<br />
|-<br />
| 0x00020000<br />
| <br />
| [[Cfg:SecureInfoGetRegion|SecureInfoGetRegion]]<br />
|-<br />
| 0x00030040<br />
| <br />
| [[Cfg:GenHashConsoleUnique|GenHashConsoleUnique]]/GetTransferableId<br />
|-<br />
| 0x00040000<br />
| [[3.0.0-5]]<br />
| [[Cfg:GetRegionCanadaUSA|GetRegionCanadaUSA]]/IsCoppacsSupported<br />
|-<br />
| 0x00050000<br />
| [[5.0.0-11]]<br />
| [[Cfg:GetSystemModel|GetSystemModel]]<br />
|-<br />
| 0x00060000<br />
| [[6.0.0-11]]<br />
| [[Cfg:GetModelNintendo2DS|GetModelNintendo2DS]]<br />
|-<br />
| 0x00070040<br />
| [[7.0.0-13]]<br />
| (u8 val) This writes the input u8 to the first byte in the config-block for blkID [[Config_Savegame|0x00160000]].<br />
|-<br />
| 0x00080080<br />
| [[7.0.0-13]]<br />
| (u32 value, u8 type) This goes through a table containing 5 entries, each entry is 2-words. Type0: compare entry-word0 with input value, on match write entry-word1 to cmdreply+8 output. Type1: compare entry-word1 with input value, on match write entry-word0 to output.<br />
|-<br />
| 0x00090040<br />
| [[7.0.0-13]]<br />
| [[Cfg:GetCountryCodeString|GetCountryCodeString]]<br />
|-<br />
| 0x000A0040<br />
| [[7.0.0-13]]<br />
| [[Cfg:GetCountryCodeID|GetCountryCodeID]]<br />
|-<br />
| 0x000B0000<br />
| [[9.3.0-21|9.3.0-X]]<br />
| IsFangateSupported<br />
|}<br />
<br />
= Config service "cfg:u" =<br />
This service provides no new commands in addition to the common ones.<br />
<br />
= Config service "cfg:s" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version<br />
! Description<br />
|-<br />
| 0x00050000<br />
| <br />
| Same as cfg:u 0x00050000 cmd?<br />
|-<br />
| 0x04010082<br />
| <br />
| [[CfgS:GetConfigInfoBlk8|GetConfigInfoBlk8]]<br />
|-<br />
| 0x04020082<br />
| <br />
| [[CfgS:SetConfigInfoBlk4|SetConfigInfoBlk4]]<br />
|-<br />
| 0x04030000<br />
| <br />
| [[Cfg:UpdateConfigNANDSavegame|UpdateConfigNANDSavegame]]<br />
|-<br />
| 0x04040042<br />
| <br />
| [[Cfg:GetLocalFriendCodeSeedData|GetLocalFriendCodeSeedData]]<br />
|-<br />
| 0x04050000<br />
| <br />
| [[CfgS:GetLocalFriendCodeSeed|GetLocalFriendCodeSeed]]<br />
|-<br />
| 0x04060000<br />
| <br />
| [[Cfg:SecureInfoGetRegion|SecureInfoGetRegion]]<br />
|-<br />
| 0x04070000<br />
| <br />
| [[CfgS:SecureInfoGetByte101|SecureInfoGetByte101]]<br />
|-<br />
| 0x04080042<br />
| <br />
| [[CfgS:SecureInfoGetSerialNo|SecureInfoGetSerialNo]]<br />
|-<br />
| 0x04090000<br />
| <br />
| [[Cfg:UpdateConfigBlk00040003|UpdateConfigBlk00040003]]<br />
|-<br />
| 0x040A0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040B0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040C0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040D0040<br />
| ?<br />
| ?<br />
|-<br />
| 0x040E0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040F0000<br />
| ?<br />
| ?<br />
|}<br />
<br />
CfgS command 0x04060000(SecureInfoGetRegion) is used by NIM module to determine the SOAP RegionId, when sending SOAP requests. See [[Nandrw/sys/SecureInfo_A|here]].<br />
<br />
= Config service "cfg:i" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version<br />
! Description<br />
|-<br />
| 0x04010082<br />
| <br />
| [[CfgS:GetConfigInfoBlk8|GetConfigInfoBlk8]]<br />
|-<br />
| 0x04020082<br />
| <br />
| [[CfgS:SetConfigInfoBlk4|SetConfigInfoBlk4]]<br />
|-<br />
| 0x04030000<br />
| <br />
| [[Cfg:UpdateConfigNANDSavegame|UpdateConfigNANDSavegame]]<br />
|-<br />
| 0x04040042<br />
| <br />
| [[Cfg:GetLocalFriendCodeSeedData|GetLocalFriendCodeSeedData]]<br />
|-<br />
| 0x04050000<br />
| <br />
| [[CfgS:GetLocalFriendCodeSeed|GetLocalFriendCodeSeed]]<br />
|-<br />
| 0x04060000<br />
| <br />
| [[Cfg:SecureInfoGetRegion|SecureInfoGetRegion]]<br />
|-<br />
| 0x04070000<br />
| <br />
| [[CfgS:SecureInfoGetByte101|SecureInfoGetByte101]]<br />
|-<br />
| 0x04080042<br />
| <br />
| [[CfgS:SecureInfoGetSerialNo|SecureInfoGetSerialNo]]<br />
|-<br />
| 0x04090000<br />
| <br />
| [[Cfg:UpdateConfigBlk00040003|UpdateConfigBlk00040003]]<br />
|-<br />
| 0x040A0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040B0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040C0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040D0040<br />
| ?<br />
| ?<br />
|-<br />
| 0x040E0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x040F0000<br />
| ?<br />
| ?<br />
|-<br />
| 0x08010082<br />
| <br />
| [[CfgS:GetConfigInfoBlk8|GetConfigInfoBlk8]]<br />
|-<br />
| 0x08020082<br />
| <br />
| [[CfgS:SetConfigInfoBlk4|SetConfigInfoBlk4]]<br />
|-<br />
| 0x08030000<br />
| <br />
| [[Cfg:UpdateConfigNANDSavegame|UpdateConfigNANDSavegame]]<br />
|-<br />
| 0x080400C2<br />
| <br />
| [[CfgI:CreateConfigInfoBlk|CreateConfigInfoBlk]]<br />
|-<br />
| 0x08050000<br />
| <br />
| [[CfgI:DeleteConfigNANDSavefile|DeleteConfigNANDSavefile]]<br />
|-<br />
| 0x08060000<br />
| <br />
| [[CfgI:FormatConfig|FormatConfig]]<br />
|-<br />
| 0x08070000<br />
| <br />
| This basically just returns result-code value 0x0, due to code this eventually executes being NOPed out.<br />
|-<br />
| 0x08080000<br />
| <br />
| This updates the config blocks for blkIDs 0x0 and 0x20000. In certain cases this may call the code for [[CfgI:FormatConfig|FormatConfig]].<br />
|-<br />
| 0x08090000<br />
| <br />
| This updates the config block for blkID 0x60000.<br />
|-<br />
| 0x080A0000<br />
| <br />
| This updates the config block for blkID 0x00040001.<br />
|-<br />
| 0x080B0082<br />
| <br />
| [[CfgI:SetGetLocalFriendCodeSeedData|SetGetLocalFriendCodeSeedData]]<br />
|-<br />
| 0x080C0042<br />
| <br />
| [[CfgI:SetLocalFriendCodeSeedSignature|SetLocalFriendCodeSeedSignature]]<br />
|-<br />
| 0x080D0000<br />
| <br />
| [[CfgI:DeleteCreateNANDLocalFriendCodeSeed|DeleteCreateNANDLocalFriendCodeSeed]]<br />
|-<br />
| 0x080E0000<br />
| <br />
| [[CfgI:VerifySigLocalFriendCodeSeed|VerifySigLocalFriendCodeSeed]] <br />
|-<br />
| 0x080F0042<br />
| <br />
| [[Cfg:GetLocalFriendCodeSeedData|GetLocalFriendCodeSeedData]]<br />
|-<br />
| 0x08100000<br />
| <br />
| [[CfgS:GetLocalFriendCodeSeed|GetLocalFriendCodeSeed]]<br />
|-<br />
| 0x08110084<br />
| <br />
| [[CfgI:SetSecureInfo|SetSecureInfo]]<br />
|-<br />
| 0x08120000<br />
| <br />
| [[CfgI:DeleteCreateNANDSecureInfo|DeleteCreateNANDSecureInfo]]<br />
|-<br />
| 0x08130000<br />
| <br />
| [[CfgI:VerifySigSecureInfo|VerifySigSecureInfo]]<br />
|-<br />
| 0x08140042<br />
| <br />
| [[CfgI:SecureInfoGetData|SecureInfoGetData]]<br />
|-<br />
| 0x08150042<br />
| <br />
| [[CfgI:SecureInfoGetSignature|SecureInfoGetSignature]]<br />
|-<br />
| 0x08160000<br />
| <br />
| [[Cfg:SecureInfoGetRegion|SecureInfoGetRegion]]<br />
|-<br />
| 0x08170000<br />
| <br />
| [[CfgS:SecureInfoGetByte101|SecureInfoGetByte101]]<br />
|-<br />
| 0x08180042<br />
| <br />
| [[CfgS:SecureInfoGetSerialNo|SecureInfoGetSerialNo]]<br />
|-<br />
| 0x0819....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081A....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081B....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081C....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081D....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081E....<br />
| ?<br />
| ?<br />
|-<br />
| 0x081F....<br />
| ?<br />
| ?<br />
|-<br />
| 0x0820....<br />
| ?<br />
| ?<br />
|}<br />
<br />
= Config NVRAM service "cfg:nor" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010040<br />
| [[CfgNor:Initialize|Initialize]]<br />
|-<br />
| 0x00020000<br />
| [[CfgNor:Shutdown|Shutdown]]<br />
|-<br />
| 0x00050082<br />
| [[CfgNor:ReadData|ReadData]]<br />
|-<br />
| 0x00060082<br />
| [[CfgNor:WriteData|WriteData]]<br />
|}<br />
This is an interface for the "SPI::NOR" service, for accessing the Wifi NVRAM/SPI Flash.</div>Reihttps://www.3dbrew.org/w/index.php?title=ACT_Services&diff=17092ACT Services2016-04-22T00:32:52Z<p>Rei: </p>
<hr />
<div>[[Category:Services]]<br />
<br />
The ACT module handles NNID accounts.<br />
<br />
= ACT service "act:u" =<br />
These commands are common to both act:u and act:a<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system-version<br />
! Description<br />
|-<br />
| 0x00010084<br />
| <br />
| Initialize<br />
|-<br />
| 0x00020040<br />
| <br />
| GetErrorCode<br />
|-<br />
| 0x000600C2<br />
| <br />
| [[ACTU:GetAccountDataBlock|GetAccountDataBlock]]<br />
|-<br />
| 0x000D0040<br />
| <br />
| GenerateUuid<br />
|}<br />
<br />
= ACT service "act:a" =<br />
These commands are exclusive to act:a<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system-version<br />
! Description<br />
|-<br />
| 0x041300C2<br />
| <br />
| UpdateMiiImage<br />
|-<br />
| 0x041B0142<br />
| <br />
| AgreeEula<br />
|-<br />
| 0x04210042<br />
| <br />
| UploadMii<br />
|-<br />
| 0x04230082<br />
| <br />
| ValidateMailAddress<br />
|}<br />
<br />
<br />
This is the service used by regular applications.<br />
<br />
=HTTPS Requests=<br />
<br />
With each request, ACT-sysmodule specifies request-header "X-Nintendo-Device-Model". This is the only *dedicated* request-header that's contains anything Old3DS/New3DS specific. This was implemented with [[9.0.0-20|9.0.0-X]], and presumably [[8.1.0-0_New3DS]]. The value is from a string initialized during ACT-sysmodule startup. The value-string is the [[Cfg:GetSystemModel|codename]] string for all 5 of the model values from [[Cfg:GetSystemModel]]. When the output from GetSystemModel is >=5(switch statement default case), it runs this: "len = snprintf(outstr, outmaxsize, "3DS-%u", model);"<br />
<br />
==Trusted Root CAs==<br />
ACT module uses a [[HTTP_Services|RootCertChain]] for all HTTPS requests, the only trusted root CA is [[SSLC:RootCertChainAddDefaultCert|default]] CertID 0x3.<br />
<br />
=New3DS=<br />
Even though ACT-sysmodule uses [[PTM_Services|ptm:s]], it doesn't use CheckNew3DS at all.</div>Reihttps://www.3dbrew.org/w/index.php?title=ACT_Services&diff=16700ACT Services2016-04-15T04:53:09Z<p>Rei: </p>
<hr />
<div>[[Category:Services]]<br />
<br />
The ACT module handles NNID accounts.<br />
<br />
= ACT service "act:a" =<br />
<br />
= ACT service "act:u" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system-version<br />
! Description<br />
|-<br />
| 0x00010084<br />
| <br />
| Initialize<br />
|-<br />
| 0x000D0040<br />
| <br />
| GenerateUuid<br />
|-<br />
| 0x00020040<br />
| <br />
| GetErrorCode<br />
|-<br />
| 0x000600C2<br />
| <br />
| [[ACTU:GetAccountDataBlock|GetAccountDataBlock]]<br />
|}<br />
<br />
This is the service used by regular applications.<br />
<br />
=HTTPS Requests=<br />
<br />
With each request, ACT-sysmodule specifies request-header "X-Nintendo-Device-Model". This is the only *dedicated* request-header that's contains anything Old3DS/New3DS specific. This was implemented with [[9.0.0-20|9.0.0-X]], and presumably [[8.1.0-0_New3DS]]. The value is from a string initialized during ACT-sysmodule startup. The value-string is the [[Cfg:GetSystemModel|codename]] string for all 5 of the model values from [[Cfg:GetSystemModel]]. When the output from GetSystemModel is >=5(switch statement default case), it runs this: "len = snprintf(outstr, outmaxsize, "3DS-%u", model);"<br />
<br />
==Trusted Root CAs==<br />
ACT module uses a [[HTTP_Services|RootCertChain]] for all HTTPS requests, the only trusted root CA is [[SSLC:RootCertChainAddDefaultCert|default]] CertID 0x3.<br />
<br />
=New3DS=<br />
Even though ACT-sysmodule uses [[PTM_Services|ptm:s]], it doesn't use CheckNew3DS at all.</div>Reihttps://www.3dbrew.org/w/index.php?title=3DS_Development_Unit_Software&diff=166993DS Development Unit Software2016-04-15T03:06:40Z<p>Rei: </p>
<hr />
<div>The following is a description of the functions what is possible with the applications unique to 3DS Development Units.<br />
<br />
For information on 3DS Development Hardware see [http://gbatemp.net/topic/327858-3ds-development-hardware/]<br />
[[File:CTR_HMN_DEV.png|300px|thumb|right|Beautifully clear picture of the Dev Apps + Home Menu. Click to view in great quality. - Xcution]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
=CTR-SDK=<br />
Descriptions Derived from SDK 2.3.4 except where notified otherwise. <br />
<br />
== Dev Menu == <br />
[[File:Devmenuicon.png]]<br />
<br />
[[File:Devmenscnsht.jpg|250px|thumb|right|Dev Menu Screenshots]]<br />
[[File:Old_Dev_Menu.png|200px|thumb|left|Old Dev Menu Screenshot]]<br />
This application on the top screen displays the firmware and revision of the Dev Menu, the free space available on the [[Flash Filesystem#TWL partition|TWL(DSi) NAND partition]] and [[SD Filesystem|SD card]] if present. It also provides information on the current file or device selected, as well as navigation instructions for the bottom screen.The bottom screen has three different windows, which are:<br />
<br />
*Programs- From this window, applications can be loaded from the [[Flash Filesystem|NAND]], the [[SD Filesystem|SD card]] and the slot 1 card (only a select scope of applications, see below for Dev Menu revisions and their corresponding scope of applications) . This is shown in the format of "Unique Id' '[[Serials#Product Code|Product Code]]'". Installed titles can be deleted from this menu.<br />
<br />
*Import- From this window, titles compiled in the format of a .[[CIA]] file, can be installed from the SD card. In later revisions this was renamed to ''SDMC''.<br />
<br />
*HIO- A tab available in later revisions of the Dev Menu. Used for installing CIAs stored on the host PC, this is supported by hio services, and hio daemon on the host PC.<br />
<br />
*ExtData- From this window, the 3DS's [[Extdata|ExtData]](this includes all ExtData) can be deleted<br />
<br />
(Note that retail 3ds games are not recognised by Developer 3DSs and the Dev Menu prints "Unknown Card" in the 'Programs' window and shows no details on top screen)<br />
<br />
(Also note that if a 3ds executable cannot be launched from the Dev Menu due to restrictive flags in the executable, such as restrictive memory, the product ID will be coloured red as opposed to black)<br />
<br />
While performing a manual update with CIAs on a dev unit, pressing Start + Y while highlighting the NATIVE_FIRM CIA will trigger an option to update firmware, thus allowing a downgrade.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! SDK Version<br />
! Titles Accessible<br />
|-<br />
| 0.9.2 - 0.13.2<br />
| Applications(NAND), System Applications , TWL Titles<br />
|- <br />
| 0.14.0 - 1.1.0<br />
| Dev NAND Applications, System Applications , TWL Titles<br />
|- <br />
| 1.2.0 - 2.0.0<br />
| Dev NAND Applications, DSiWare<br />
|-<br />
| 2.1.0 - 2.4.0<br />
| Applications(SD), Dev NAND Applications, DSiWare<br />
|-<br />
| 3.0.0 - 3.1.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare<br />
|-<br />
| 3.2.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser<br />
|-<br />
| 3.3.0 - Recent<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser, TwlNandFiler <br />
|}<br />
<br />
== Config == <br />
[[File:Configicon.png]]<br />
<br />
[[File:3DS_dev_configmenu.JPG|250px|thumb|right|Config Menu Screenshot]]<br />
[[File:Dev config.jpg|250px|thumb|right|Newer Config Menu Screenshot]]<br />
This application is a configuration menu for the 3DS, which has the following options:<br />
<br />
*Reset Settings - Resets all settings to default.<br />
<br />
*Hid Setting - (human interface device) Calibrates Touch-Pad and Analog stick.<br />
<br />
*RTC Setting - (real time clock) Sets system time.<br />
<br />
*Raw RTC Setting - If the application being tested uses GetUserTimeOffset() to detect if the user has changed the clock, this can be used to change the clock without the application detecting it.<br />
<br />
*LCD Setting - Sets display settings as found in the home menu as well as flicker values.<br />
<br />
*User Info Setting - Allows username change and the username profanity tag to be set to true or false.<br />
<br />
::*CountryId - Changes 3DS between installed countries. It can also be set to an undefined ID (255).<br />
::*RegionId - Changes between the location in the selected country. Unidentified is displayed when RegionId is set to 255<br />
<br />
*Other Setting(branches off into other settings) - <br />
:*Sound Mode - mono/stereo/surround<br />
<br />
:*System Mode - Changes memory allowance.<br />
::*Prod - 64MB Memory mode ([[Home Menu]] can usually only run in this mode and ''most'' retail-looking units cannot switch out of this mode)<br />
::*Dev1 - 96MB Memory mode <br />
::*Dev2 - 80MB Memory mode<br />
::*Dev3 - 72MB Memory mode<br />
::*Dev4 - 32MB Memory mode<br />
::All CTR Debuggers/Prototype units can change memory allowance. For Developer Test Units, the ability to change Memory Allowance, appears to be dependent on an option when buying the Test Unit (similar to having a choice to purchase IS-Nitro's Wireless/USG options when buying an IS-Nitro from Nintendo). If anything other than prod or dev2 is selected, menu settings are automatically changed to test menu.<br />
::On some Test Units, it's possible to run the [[Home Menu]] outside of Prod. However, software with limited memory (such as the web browser) cannot be launched from the home menu if the home menu is outside of Prod.<br />
<br />
:*Exception handler - Selects whether to enable or disable the application's handling of exceptions that arise in the non-debug environment. <br />
If the application is not set to handle exceptions, the application quits when an exception occurs. - enable/disable <br />
<br />
:*Break Stop - (enable/disable) - Selects whether to enable or disable stopping the application when a break is encountered in the non-debug environment. If the application is not made to stop, it quits on a break.<br />
<br />
:*Menu - (Home Menu/Test Menu) This function edits the [[Config_Savegame|configuration]] field containing the menu TID for dev units, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module.<br />
<br />
:*Language - same options found in the Language section of [[System Settings]] but also has an "invalid" option<br />
<br />
:*Dlp Force Child Import - (enable/disable) - normally the 3ds caches downloaded "Download Play (Dlp)" applications on the nand and only re-downloads, overwriting the cached copy if the version application being requested to downloaded is higher than what is currently present on the nand. Enabling this option forces the 3ds to download and overwrite the cached copy on the nand, regardless of the version of the application being downloaded. This is of course for testing purposes.<br />
<br />
:*Debug Mode - (enable/disable) - Select enable or disable to enable and disable debugging functions.<br />
Debugging is always disabled for retail products. <br />
<br />
:In later versions of Config, "Other Setting" also has:<br />
::*FS Latency Emulation - Filesystem Latency, in milliseconds (0ms-2550ms). Selection is in increments of 10. (ie 0ms->10ms->20ms...)<br />
::*Coppacs Setting - In the U.S., a law called the Children's Online Privacy Protection Act (COPPA) requires consent from the parent or guardian for collection and use of personal information from children under the age of 13. Canada has a nearly identical law. This setting is only enabled for software for the Americas region, and when the country in System Settings is set to the US or Canada.<br />
::*Olv Access Key - Unknown (Might refer to Olive/OLV Miiverse Library)<br />
<br />
*Test Setting - Test calibration of touch pad and joystick<br />
<br />
*Eula Setting - Allows user to change "Agree Version" namely: "ff.ff" the two symbol sets are interchangeable with combination variations from aa to 99 (default is 00.00 where the Eula is not accepted yet).<br />
<br />
*Stereo Camera Cal for Check - Checks the behavior of applications that use the stereo camera by rewriting and writing back some of the calibration values. <br />
<br />
*Gyro / Accel Cal for Check - Allows Gyro and Accelerometer to be calibrated.<br />
<br />
*Ctr Info Setting - Changes settings to that found on the ctrsetting.txt present on the SD.<br />
<br />
== Downloadplay Client ==<br />
[[File:Dlpcliscnsht.jpg|250px|thumb|right|Downloadplay Client Screenshots]]<br />
[[File:Dlpcliicon.png]]<br />
<br />
<br />
Even though a Developer 3DS has a "Download Play" application visually identical to the retail 3DS [[Download Play|application]], the "Downloadplay Client" application can be installed as an alternative to the regular Download Play application. (Note: a Developer 3DS' and Retail 3DS' cannot receive download play 'children' from each-other.) This Developer application is a stripped down version of 'Download Play' which has the following options and limitations:<br />
<br />
*It can only download 3ds download play titles<br />
<br />
*Scraps the GUI found in the normal Download Play application (see screenshot)<br />
<br />
*Can select from a maximum of 16 Download play 'servers'<br />
<br />
This application is clearly used for easy testing of download play 'child' apps, without the hassle of constantly re-navigating the normal Download Play interface<br />
<br />
<br />
<br />
<br />
<br />
== Network Settings ==<br />
[[File:Netsetscnsht.jpg|250px|thumb|right|Network Settings Screenshots]]<br />
[[File:Netseticon.png]]<br />
<br />
This Developer application allows the users to directly modify the following from any of the three possible network setting 'slots'<br />
<br />
*Security Mode :(the wireless encryption the network is using) OPEN/WEP 40bit/WEP 104bit/128bit/WPA TKIP/WPA2 TKIP/WPA AES/WPA2 AES<br />
<br />
*SSID :(self-explanitory) maximum 32 characters<br />
<br />
*KEY :(the key for the encrytion is here in plain text) the maximum length depends on encryption type<br />
<br />
*AutoDNS :(whether the 3DS obtains the DNS automatically or not) |True-3DS obtains the DNS automatically|False-3DS uses the DNS server address provided by the user(it is possible to edit this here)|<br />
<br />
At the bottom of the setting options there are two choices:<br />
<br />
*Write Setting & Connect Test To AP - Applies the settings above and performs a connection test(note any settings made in system settings for this connection, which are not present in the above settings will be nullified, for example any proxy server settings)<br />
<br />
*Remove Setting - removes all settings for this 'slot'<br />
<br />
<br />
<br />
<br />
== SaveDataFiler ==<br />
[[File:Saveflscnsht.jpg|250px|thumb|right|SaveDataFiler Screenshots]]<br />
[[File:Saveflicon.png]]<br />
<br />
<br />
<br />
This 3DS Developer application allows save files and extdata to be exported and imported from an SD Card. The window has three tabs:<br />
<br />
*User - This is where saves for 3DS applications and saves on 3DS Game Cards(not DS Game Cards) can be exported to the SD Card. Saves cannot be deleted here.<br />
<br />
*ExtData - This is where application extdata can be deleted or exported to the SD Card for later use<br />
<br />
*SD - This is where extdata and application saves on the SD Card can be imported to the 3DS or 3DS Game Card. Also extdata and application saves can be deleted from the SD Card<br />
<br />
<br />
User save data is exported to sdmc:/filer/UserSaveData/YYYYMMDD(Hour)(Minute)(Second)<br />
<br />
<br />
It creates a folder in that path and 3 files. The 2 files exported to the above path are <uniqueID>.dat and <uniqueID>_.dat while a folder named /<uniqueID>/ in that path contains <ExHeader Name>.dat<br />
<br />
== CTR MenuSelector ==<br />
[[File:MenuSelector.png|120px|thumb|right|Menu Selector Screenshot]]<br />
[[File:Menuselectoricon.jpg]]<br />
<br />
This application when loaded can change the current 'Active Menu'(being used at the moment) by editing the menu TID [[Config_Savegame|configuration]] field, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module. <br />
With the release of SDK 1.1.0, this application was superseded by the introduction of the "Menu" choice in the [[3DS Development Unit Software#Config|Config Menu]] and consequently removed as a standard application.<br />
<br />
== CecLotcheckTool ==<br />
[[File:Ceclotscnsht.jpg|250px|thumb|right|CecLotcheckTool Screenshot]]<br />
[[File:Cecloticon.png]]<br />
<br />
This application is used to manage CECs (Chance Encounter Communications, AKA StreetPass hits) for any of the twelve possible applications used on the 3DS, if there are any. The application has twelve possible slots which can be filled by BOXes . The BOXes are individual applications which are permitted by the user to use CECs, such as StreetPass Mii Plaza or Nintendo 3DS Sound. And as such, the boxes in this application correspond to the applications in 'StreetPass Management', in 'System Settings' (StreetPass Management is accessible from retail 3DSs). The functions of this application:<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
*<Y> BOX Options - this opens up a sub menu with the following options(when hovering over Nintendo 3DS Sounds BOX - the only one I can test the app with):<br />
<br />
*Box Info - Gives the Out-Box parameters [[File:Boxinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Message Info (OUT-BOX) - Gives the Message Parameters For the current BOX [[File:Mesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Dummy Message Settings - Not quite sure what the options do here [[File:Dummesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*<A> Create Dummy BOXes - Creates dummy BOXes to fill any unused slots. (does not overwrite any present slots)<br />
<br />
*<X> Delete BOXes - Deletes all of the BOXes from the slots.<br />
<br />
*<START> CEC Filter Reset - I can only guess that it erases data collected by CEC enabled apps.<br />
<br />
<br />
<br />
== BossLotCheckTool ==<br />
[[File:Bosslcscnsht.png|100px|thumb|right|BossLotCheckTool Screenshot]]<br />
[[File:Bosslcicon.png]]<br />
<br />
This application is used to manage BOSS (SpotPass) tasks/data for 3DS titles which utilise BOSS communications. 'Pokedex' is an application which utilizes BOSS comunications. This application also displays the 3DS's friend code, although this code is not to be confused with the 3DS's Friend Card code found in 'Friends List'. The user can browse by unique ID the 3DS titles(excluding system titles) registered to use BOSS. For each title you can view details about the downloaded 'NsData' which accompanies BOSS downloads, view the BOSS task lists (implies applications can perform more than one BOSS task). You can also view various details about each BOSS task, including:<br />
<br />
TaskStatus : DONE?<br />
TaskExecCount : How many times the BOSS task has been executed<br />
TaskExecInterval : Period of time (in seconds) in the task is to be executed, in intervals<br />
TaskPriority : Is a number value <br />
URL : The URL to the BOSS content<br />
AP Info : NONE?<br />
TaskResultCode : Success or not<br />
HTTP_StatusCode : Self explanatory <br />
DataSize : Size of Content (in bytes)<br />
Last_Modified : Last time the BOSS content (on server) was modified<br />
StartTime : when the BOSS task was registered<br />
OptOut : Whether the user can/has opted out of BOSS communication for this task<br />
<br />
It also possible to manually execute the BOSS task from here<br />
<br />
== Stereo Camera Calibrator ==<br />
[[File:Stecamscnsht.png|100px|thumb|right|Stereo Camera Calibrator Screenshot]]<br />
[[File:Stecamicon.png]]<br />
<br />
The Stereo Camera Calibrator (SCC), in a nutshell, allows the user to adjust the configuration of the outer cameras in relation to each other. It can be configured automatically by positioning the 3DS a set distance away from a special chart. It can also be configured manually, by setting the rotation of each camera image and the size of the right eye camera. The 3D effect can be perceived by superimposing the right eye camera image translucently with the left eye camera image or by viewing the 3D image directly by use of the parallax barrier in the 3DS Screen. <br />
<br />
<br />
<br />
== Model Viewer ==<br />
[[File:ModelViewer.png|100px|thumb|right|3DS Model Viewer Screenshot]]<br />
[[File:ModelViewericon.png]]<br />
<br />
As the name suggests this application allows the user to view models. It is supposed to be used with a CTR-Debugger, assumingly so models can be entered in the memory of the program. But the program can be used on Test Units, but the model is restricted to three coloured lines depicting the 3 dimensions (x,y,z). The model can be viewed from any angle or scale, the perspective is controlled by the circle pad and directional buttons. And of course the application utilises the 3D effect<br />
<br />
<br />
<br />
<br />
== Friend Testing Partner ==<br />
[[File:Ftestpscnsht.png|250px|thumb|right|Friend Testing Partner Screenshot]]<br />
[[File:Ftestpicon.png]]<br />
<br />
The Friend Testing Partner application is used to test/monitor the 3DS's Friend List function. It allows the user to test various functions of the 3DS's out-going Friend Card, by giving the following options:<br />
*Master Control - (RUN/STOP) (STOP is the default setting) when ‘STOP’ is selected the 3DS Friend Card uses the user’s settings/data. When ‘RUN’ is selected the 3DS Friend Card uses the dummy settings/data chosen to test from the settings bellow.<br />
<br />
*Login/Logout - (ON/OFF) (ON is the default setting) What effect this has on the Friend Card is not known<br />
<br />
*Playing Title - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the currently used title is ignored and a dummy applications are cycled through as the ‘Playing Title’ approximately every ten seconds in its place. The dummy applications used are the applications found in Firmware version 1.0.0-0 of a retail 3DS including the ‘Nintendo Zone viewer’ app. When ‘OFF’ is selected the currently used title (which is the Friend Testing Partner app) is used as the ‘Playing Title’<br />
<br />
*Mode Description - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the Software in Use(Playing Title) is accompanied by the Date and Time found on that user’s 3DS. The Mode Description is refreshed every ten or so seconds. When ‘OFF’ is selected the date and time on the user’s 3DS is not displayed.<br />
<br />
*Message - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the message made by the user is replaced(not overwritten as it reverts back to the user’s choice when this is ‘OFF’) by the current date and time in the format “YYYYMMDD HHMMSS”, this is refreshed every ten or so seconds.<br />
<br />
*Mii - (ON/OFF) (ON is the default setting) When 'ON' the currently used Mii is replaced with one of 4 dummy Miis and cycles them through every ten seconds with a new dummy mii. This effect can only be seen from another 3DS not the host<br />
<br />
*Favorite Title (ON/OFF) (ON is the default setting) When 'ON' is selected, the user’s favorite title is replaced with a dummy, which is replaced every 10 or so seconds. <br />
Also this application allows the user to monitor the whether the 3DS is online or not and whether the 3DS’s Friend Presence is online or offline. Every time a dummy setting is refreshed it is displayed on the top screen with a time stamp.<br />
<br />
<br />
<br />
== Game Coin Setter ==<br />
[[File:Coinstscnsht.png|100px|thumb|right|Game Coin Setter Screenshot]]<br />
[[File:Coinsticon.png]] <br />
<br />
This application is used to set the Play Coin count on the 3DS. Obviously this was created so a developer can test parts of their game in which the player can exchange earned play coins for in-game content or similar. It has a very simple interface showing the current play coin count and the adjustable option, the target coin count. These are the controls with explanation of each:<br />
<br />
*LEFT/RIGHT - using the D-pad only to adjust the 'Target Count' to a number between 0-300.<br />
<br />
*A - Sets the 'Current Count' (amount of play coins the system has) to the user selected 'Target Count' (the user specified amount of play coins)<br />
<br />
*L+R+X - "Preclude today's Increment" This is fairly complicated...This either removes all coins added today, or removes all coins added previously starting the day before. Then it allows you to add more (with the value you set). This is more of a theory, it is poorly translated and this option isn't very useful anyway. Do yourself a favor and just give yourself millions of coins so you can buy all the fun stuff. :)<br />
<br />
<br />
== Dummy Nintendo eShop ==<br />
This application exists to debug API(JumPToEshop( ) ) on the 3DS. This was created so a developer can test parts of their game in which the player can preview or purchase titles within a game. It is mainly used in conjunction with Downloadable content. It has a very simple interface showing the reason for its existence and controls for exiting to the home menu or finalizing the Dummy Shop. The Dummy Nintendo eShop also shares the same Title ID and Unique ID as the Retail Nintendo E-Shop.<br />
[[File:INdummyshop.png|100px|thumb|right|SDK 7 DummyEshop Screenshot]]<br />
[[File:dummyshop.png]]<br />
<br />
<br />
== FangateFwUpdater ==<br />
This is a tool for updating or destroying NFC reader/writer firmware. This tool cannot be used with SNAKE development devices or SNAKE development tools. It operates only with CTR development devices and CTR development tools.<br />
<br />
== TWL Development Tools ==<br />
<br />
These are DSi/DS mode development tools repackaged into a [[CIA]], for installing to the TWL NAND.<br />
<br />
=== NINTENDO DS - WMtest ===<br />
[[File:Wmtestscnsht.jpg|300px|thumb|right|WMtest Screenshot]]<br />
[[File:Wmtesttool.png]]<br />
<br />
This application is a TWL(DSi) application compiled for use on the 3DS. It is an wireless test tool with its uses explained below:<br />
<br />
*Scan Test - Scans Wireless channels 1-13(can be focused on one specific channel) for broadcasting stations. It can detect two types of broadcasting stations:<br />
<br />
Wifi Access Points - Giving the Mac Address, Broadcasting Channel, 'c', and the SSID<br />
<br />
DS Stations such as DS Download stations and Pokemon distributors - Giving the Mac Address, Brodcasting Channel, TGID and GGID<br />
<br />
*ScanEx Test - and has two Scan Types. Passive which lets you individually scan channels 1-13 (only one at at time) and the DS distribution channels (1,7,13 all at once). And Active which scans all 13 channels at once. when it finds a channel it prints on the bottom screen next to 'Found' 'bssDescCount='<br />
<br />
*MeasureChannel Test - not quite sure what this does but it for a given channel it gives a ratio(in percentage form), which it finds in its allocated test time ranging from 10ms to 1000ms. And for every interval of time which is specified, it tests and gives a ratio.<br />
<br />
*Noise Mode - Seeks wireless channels in which to make wireless noise (This is not made very clear on the app). You can specify the:<br />
<br />
Channel where the scanner will seek to make noise<br />
<br />
Noise Rate, ranging from 0% to 100%<br />
<br />
Frequency, ranging from 10ms to 50ms<br />
<br />
Seek Mode, ranging from 1000ms to 1500ms<br />
<br />
When the settings are chosen the top screen has two counters which display 'Noise ON count' and 'Noise OFF count' the counters are affected by the noise rate. Starting at 0% the 'Noise ON count' does not change but as the Noise rate gets closer to 100% the count moves and gets faster as Noise rate reaches 100%. For 'Noise OFF count' it is the exact opposite to the ' Noise ON count' in regards to counting.<br />
<br />
<br />
=NW4C=<br />
NintendoWare for CTR is comprised of tools that deal with creating effects, fonts, models, layouts, sound, and text. There are CTR versions of some of the viewers.<br />
<br />
==H3D Model Viewer==<br />
[[File:H3Dscrnshot.png|180px|thumb|right|H3D Viewer Screenshot]]<br />
[[File:H3Dicon.png]]<br />
<br />
Used for viewing Binary CTR Models (.bcmdl). Models need to be loaded into memory via CTR-PARTNER. There is also a PC equivalent program with the same layout.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Layout Viewer==<br />
[[File:LYTscrnshot.png|180px|thumb|right|Layout Viewer bottom screen]]<br />
[[File:LYTicon.png]]<br />
<br />
Used for viewing Binary CTR Layouts (.bclyt). It is used with CTR-PARTNER to load layouts into RAM.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Effect Viewer==<br />
[[File:EFTscrnshot.png|180px|thumb|right|EffectViewer4C Screenshot]]<br />
[[File:EFTicon.png]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
=System Updaters=<br />
[[File:CSUscrnshot.png|300px|thumb|right|CSU Screenshot]]<br />
<br />
There are two kinds of system updaters for dev (panda) units, CTR System Updater (CSU) and SNAKE System Updater. As the names imply, the former is for original 3DS and the latter is for New 3DS. They are used to update the panda unit's 'firmware'/SDK Version. The romfs of the CSU contains the contents that will be installed to NAND. They contain all system titles as well as Devmenu and Config.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
----<br />
[[Category:3DS Development Unit Related Pages]]</div>Reihttps://www.3dbrew.org/w/index.php?title=Application_Manager_Services&diff=16672Application Manager Services2016-04-12T05:30:37Z<p>Rei: /* Application Manager services "am:sys", "am:u", "am:net" */</p>
<hr />
<div>[[Category:Services]]<br />
<br />
= Application Manager services "am:sys", "am:u", "am:net" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010040<br />
| [[AM:GetTitleCount|GetTitleCount]]<br />
|-<br />
| 0x00020082<br />
| [[AM:GetTitleList|GetTitleList]]<br />
|-<br />
| 0x00030084<br />
| [[AM:GetTitleInfo|GetTitleInfo]]<br />
|-<br />
| 0x000400C0<br />
| [[AM:DeleteApplicationTitle|DeleteApplicationTitle]]<br />
|-<br />
| 0x000500C0<br />
| [[AM:GetTitleProductCode|GetTitleProductCode]]<br />
|-<br />
| 0x000600C0<br />
| [[AM:GetTitleExtDataId|GetTitleExtDataId]]<br />
|-<br />
| 0x00070080<br />
| [[AM:DeleteTicket|DeleteTicket]]<br />
|-<br />
| 0x00080000<br />
| [[AM:GetTicketCount|GetTicketCount]]<br />
|-<br />
| 0x00090082<br />
| [[AM:GetTicketList|GetTicketList]]<br />
|-<br />
| 0x000A0000<br />
| [[AM:GetDeviceID|GetDeviceID]]<br />
|-<br />
| 0x000B0040<br />
|?<br />
|-<br />
| 0x000C0082<br />
|?<br />
|-<br />
| 0x000D0084<br />
| [[AM:GetPendingTitleInfo|GetPendingTitleInfo]]<br />
|-<br />
| 0x000E00C0<br />
| [[AM:DeletePendingTitle|DeletePendingTitle]]<br />
|-<br />
| 0x000F00C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x002100C0<br />
|-<br />
| 0x00100102<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00220102<br />
|-<br />
| 0x00110104<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00230104<br />
|-<br />
| 0x00120102<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00240102<br />
|-<br />
| 0x00130040<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x003F0040<br />
|-<br />
| 0x00140040<br />
| [[AM:FinalizePendingTitles|FinalizePendingTitles]]<br />
|-<br />
| 0x00150040<br />
| [[AM:DeleteAllPendingTitles|DeleteAllPendingTitles]]<br />
|-<br />
| 0x00160000<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00410000<br />
|-<br />
| 0x00170044<br />
|?<br />
|-<br />
| 0x00180080<br />
| [[AM:InitializeTitleDatabase|InitializeTitleDatabase]]<br />
|-<br />
| 0x00190040<br />
| [[AM:QueryAvailableExternalTitleDatabase|QueryAvailableExternalTitleDatabase]]<br />
|-<br />
| 0x001A00C0<br />
| [[AM:GetDSiWareExportSize|GetDSiWareExportSize]]<br />
|-<br />
| 0x001B0144<br />
| [[AM:ExportDSiWare|ExportDSiWare]]<br />
|-<br />
| 0x001C0084<br />
| [[AM:ImportDSiWare|ImportDSiWare]]<br />
|-<br />
| 0x001D0000<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00510000<br />
|-<br />
| 0x001E00C8<br />
| DSiWare related.<br />
|-<br />
| 0x001F0040<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00520040<br />
|-<br />
| 0x00200000<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00540000<br />
|-<br />
| 0x00210042<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x004C0042<br />
|-<br />
| 0x00220080<br />
|[[AM:DeletePendingTitles|DeletePendingTitles]]<br />
|-<br />
| 0x00230080<br />
| [[AM:GetPendingTitleCount|GetPendingTitleCount]]<br />
|-<br />
| 0x002400C2<br />
| [[AM:GetPendingTitleList|GetPendingTitleList]]<br />
|-<br />
| 0x002500C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005600C0<br />
|-<br />
| 0x00260044<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00620044<br />
|-<br />
| 0x00270044<br />
|?<br />
|-<br />
| 0x00280108<br />
|?<br />
|-<br />
| 0x00290082<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00670082<br />
|-<br />
| 0x002A00C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006A00C0<br />
|-<br />
| 0x002B0142<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006B0142<br />
|-<br />
| 0x002C0084<br />
|?<br />
|-<br />
| 0x002D00C0<br />
|?<br />
|}<br />
<br />
= Application Manager services "am:u" and "am:net" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x04010080<br />
| [[AM:InstallFIRM|InstallFIRM]]<br />
|-<br />
| 0x04020040<br />
| [[AM:StartInstallCIADB0|StartInstallCIADB0]]<br />
|-<br />
| 0x04030000<br />
| [[AM:StartInstallCIADB1|StartInstallCIADB1]]<br />
|-<br />
| 0x04040002<br />
| [[AM:AbortCIAInstall|AbortCIAInstall]]<br />
|-<br />
| 0x04050002<br />
| [[AM:CloseCIAFinalizeInstall|CloseCIAFinalizeInstall]]<br />
|-<br />
| 0x04060002<br />
| [[AM:CloseCIA|CloseCIA]]<br />
|-<br />
| 0x040700C2<br />
| [[AM:FinalizeTitlesInstall|FinalizeTitlesInstall]]<br />
|-<br />
| 0x04080042<br />
| [[AM:GetCiaFileInfo|GetCiaFileInfo]]<br />
|-<br />
| 0x04090004<br />
| [[AM:GetCiaIcon|GetCiaIcon]]<br />
|-<br />
| 0x040A0002<br />
|?<br />
|-<br />
| 0x040B0002<br />
| For this command, AM module reads an u64 from the [[CIA]] using the specified file-handle? (u64* out, [[CIA]] filehandle)<br />
|-<br />
| 0x040C0002<br />
|?<br />
|-<br />
| 0x040D0042<br />
|?<br />
|-<br />
| 0x040E00C2<br />
| [[AM:InstallTitlesFinish|InstallTitlesFinish]]<br />
|-<br />
| 0x040F0000<br />
| [[AM:InstallNATIVEFIRM|InstallNATIVEFIRM]]<br />
|-<br />
| 0x041000C0<br />
| [[AM:DeleteTitle|DeleteTitle]]<br />
|-<br />
| 0x04110044<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00500044<br />
|-<br />
| 0x04120000<br />
| [[AM:Initialize|Initialize]]<br />
|-<br />
| 0x04130002<br />
|?<br />
|-<br />
| 0x04140044<br />
| [[AM:GetCiaMetaSection|GetCiaMetaSection]]<br />
|-<br />
| 0x04150080<br />
|?<br />
|-<br />
| 0x041600C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006400C0<br />
|-<br />
| 0x041700C0<br />
| [[AM:MigrateAGBtoSAV|MigrateAGBtoSAV]]<br />
|-<br />
| 0x04180040<br />
|?<br />
|-<br />
| 0x04190000<br />
|?<br />
|}<br />
<br />
= Application Manager service "am:app" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x100100C0<br />
| GetNumContentInfos<br />
|-<br />
| 0x10020104<br />
| ApplicationControl::FindContentInfos<br />
|-<br />
| 0x10030142<br />
| ApplicationControl::ListContentInfos<br />
|-<br />
| 0x10040102<br />
| ApplicationControl::DeleteContents<br />
|-<br />
| 0x10050084<br />
| GetDataTitleInfos<br />
|-<br />
| 0x10060080<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005F0080<br />
|-<br />
| 0x10070102<br />
| ApplicationControl::ListDataTitleTicketInfos<br />
|-<br />
| 0x100801C2<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006801C2<br />
|-<br />
| 0x100900C0<br />
| IsDataTitleInUse<br />
|-<br />
| 0x100A0000<br />
| IsExternalTitleDatabaseInitialized<br />
|-<br />
| 0x100B00C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006A00C0<br />
|-<br />
| 0x100C0142<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006B0142<br />
|-<br />
| 0x100D0084<br />
| GetDemoDataTitleInfos<br />
|}<br />
<br />
= Application Manager service "am:sys" =<br />
<br />
= Application Manager service "am:u" =<br />
<br />
= Application Manager service "am:pipe" =<br />
<br />
= Application Manager network service "am:net" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x08010000<br />
| [[AMNet:InstallTicketBegin|InstallTicketBegin]]<br />
|-<br />
| 0x08020002<br />
| [[AMNet:InstallTicketAbort|InstallTicketAbort]]<br />
|-<br />
| 0x08030002<br />
| [[AMNet:InstallTicketFinalize|InstallTicketFinalize]]<br />
|-<br />
| 0x08040100<br />
| [[AMNet:InstallTitleBegin|InstallTitleBegin]]<br />
|-<br />
| 0x08050000<br />
| [[AMNet:InstallTitleAbort|InstallTitleAbort]]<br />
|-<br />
| 0x080600C0<br />
| [[AMNet:InstallTitleResume|InstallTitleResume]]<br />
|-<br />
| 0x08070000<br />
| [[AMNet:InstallTitleAbortTMD|InstallTitleAbortTMD]]<br />
|-<br />
| 0x08080000<br />
| [[AMNet:InstallTitleFinish|InstallTitleFinish]]<br />
|-<br />
| 0x080900C2<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x002A00C2<br />
|-<br />
| 0x080A0000<br />
| [[AMNet:InstallTmdBegin|InstallTmdBegin]]<br />
|-<br />
| 0x080B0002<br />
| [[AMNet:InstallTmdAbort|InstallTmdAbort]]<br />
|-<br />
| 0x080C0042<br />
| [[AMNet:InstallTmdFinalize|InstallTmdFinalize]]<br />
|-<br />
| 0x080D0042<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00570042<br />
|-<br />
| 0x080E0040<br />
| [[AMNet:InstallContentBegin|InstallContentBegin]]<br />
|-<br />
| 0x080F0002<br />
| [[AMNet:InstallContentAbort|InstallContentAbort]]<br />
|-<br />
| 0x08100040<br />
| [[AMNet:InstallContentResume|InstallContentResume]]<br />
|-<br />
| 0x08110002<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x001A0000?<br />
|-<br />
| 0x08120002<br />
| [[AMNet:InstallContentFinalize|InstallContentFinalize]]<br />
|-<br />
| 0x08130000<br />
| [[AMNet:GetTotalContents|GetTotalContents]]<br />
|-<br />
| 0x08140042<br />
| [[AMNet:GetContentIndexes|GetContentIndexes]]<br />
|-<br />
| 0x08150044<br />
| [[AMNet:GetContentsInfo|GetContentsInfo]]<br />
|-<br />
| 0x08160146<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00390146<br />
|-<br />
| 0x08170146<br />
| Stubbed; returns 0xF8C083F4<br />
|-<br />
| 0x08180042<br />
| [[AMNet:GetCTCert|GetCTCert]]<br />
|-<br />
| 0x08190108<br />
| [[AMNet:SetCertificates|SetCertificates]]<br />
|-<br />
| 0x081A0042<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x003E0042<br />
|-<br />
| 0x081B00C2<br />
| [[AMNet:InstallTitlesFinish|InstallTitlesFinish]]<br />
|-<br />
| 0x081C0100<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x004B0100<br />
|-<br />
| 0x081D0080<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00490080<br />
|-<br />
| 0x081E0102<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x004A0102<br />
|-<br />
| 0x081F0080<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005F0080<br />
|-<br />
| 0x08200102<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00600102<br />
|-<br />
| 0x08210142<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00610142<br />
|-<br />
| 0x08220000<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005B0000<br />
|-<br />
| 0x08230044<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005C0044<br />
|-<br />
| 0x08240082<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x005D0082<br />
|-<br />
| 0x08250102<br />
|?<br />
|-<br />
| 0x08260042<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x00630042<br />
|-<br />
| 0x08270000<br />
|?<br />
|-<br />
| 0x082800C0<br />
| Wrapper for [[Application_Manager_Services_PXI|AMPXI]] command 0x006C00C0<br />
|}<br />
<br />
= File service =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
|-<br />
| 0x080200C2<br />
| [[AMFile:Read|Read]]<br />
|-<br />
| 0x08030102<br />
| [[AMFile:Write|Write]]<br />
|-<br />
| 0x08040000<br />
| [[AMFile:GetSize|GetSize]]<br />
|-<br />
| 0x08050080<br />
| [[AMFile:SetSize|SetSize]]<br />
|-<br />
| 0x08080000<br />
| [[AMFile:Close|Close]]<br />
|}<br />
<br />
These are identical to [[Filesystem_services#File_service|FSFile]].<br />
<br />
=Errors=<br />
See [[Application_Manager_Services_PXI|this]].</div>Reihttps://www.3dbrew.org/w/index.php?title=AM:ReloadDBS&diff=16671AM:ReloadDBS2016-04-12T05:29:31Z<p>Rei: Rei moved page AM:ReloadDBS to AM:QueryAvailableExternalTitleDatabase: proper symbol ( nn::am::QueryAvailableExternalTitleDatabase() )</p>
<hr />
<div>#REDIRECT [[AM:QueryAvailableExternalTitleDatabase]]</div>Reihttps://www.3dbrew.org/w/index.php?title=AM:QueryAvailableTitleDatabase&diff=16670AM:QueryAvailableTitleDatabase2016-04-12T05:29:31Z<p>Rei: Rei moved page AM:ReloadDBS to AM:QueryAvailableExternalTitleDatabase: proper symbol ( nn::am::QueryAvailableExternalTitleDatabase() )</p>
<hr />
<div>=Request=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code [0x00190040]<br />
|-<br />
| 1<br />
| u8 [[Filesystem_services#MediaType|Media Type]]?<br />
|}<br />
<br />
=Response=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code<br />
|-<br />
| 1<br />
| Result code<br />
|-<br />
| 2<br />
| u8, title database availability, 0 = unavailable, 1 = available<br />
|}<br />
<br />
=Description=<br />
This is abstraction for [[AMPXI:ReloadDBS]].</div>Reihttps://www.3dbrew.org/w/index.php?title=Friend_Services&diff=16061Friend Services2016-03-18T03:45:28Z<p>Rei: </p>
<hr />
<div>[[Category:Services]]<br />
= Friend Service "frd:u" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010000<br />
| [[FRDU:HasLoggedIn|HasLoggedIn]]<br />
|-<br />
| 0x00020000<br />
| [[FRDU:IsOnline|IsOnline]]<br />
|-<br />
| 0x00030002<br />
| [[FRDU:Login|Login]]<br />
|-<br />
| 0x00040000<br />
| [[FRDU:Logout|Logout]]<br />
|-<br />
| 0x00050000<br />
| [[FRDU:GetMyFriendKey|GetMyFriendKey]]<br />
|-<br />
| 0x00060000<br />
| [[FRDU:GetMyPreference|GetMyPreference]]<br />
|-<br />
| 0x00070000<br />
| [[FRDU:GetMyProfile|GetMyProfile]]<br />
|-<br />
| 0x00080000<br />
| [[FRDU:GetMyPresence|GetMyPresence]]<br />
|-<br />
| 0x00090000<br />
| [[FRDU:GetMyScreenName|GetMyScreenName]]<br />
|-<br />
| 0x000A0000<br />
| [[FRDU:GetMyMii|GetMyMii]]<br />
|-<br />
| 0x000B0000<br />
| [[FRDU:GetMyLocalAccountId|GetMyLocalAccountId]]<br />
|-<br />
| 0x000C0000<br />
| [[FRDU:GetMyPlayingGame|GetMyPlayingGame]]<br />
|-<br />
| 0x000D0000<br />
| [[FRDU:GetMyFavoriteGame|GetMyFavoriteGame]]<br />
|-<br />
| 0x000E0000<br />
| [[FRDU:GetMyNcPrincipalId|GetMyNcPrincipalId]]<br />
|-<br />
| 0x000F0000<br />
| [[FRDU:GetMyComment|GetMyComment]]<br />
|-<br />
| 0x00100040<br />
| [[FRDU:GetMyPassword|GetMyPassword]]<br />
|-<br />
| 0x00110080<br />
| [[FRDU:GetFriendKeyList|GetFriendKeyList]]<br />
|-<br />
| 0x00120042<br />
| [[FRDU:GetFriendPresence|GetFriendPresence]]<br />
|-<br />
| 0x00130142<br />
| [[FRDU:GetFriendScreenName|GetFriendScreenName]]<br />
|-<br />
| 0x00140044<br />
| [[FRDU:GetFriendMii|GetFriendMii]]<br />
|-<br />
| 0x00150042<br />
| [[FRDU:GetFriendProfile|GetFriendProfile]]<br />
|-<br />
| 0x00160042<br />
| [[FRDU:GetFriendRelationship|GetFriendRelationship]]<br />
|-<br />
| 0x00170042<br />
| [[FRDU:GetFriendAttributeFlags|GetFriendAttributeFlags]]<br />
|-<br />
| 0x00180044<br />
| [[FRDU:GetFriendPlayingGame|GetFriendPlayingGame]]<br />
|-<br />
| 0x00190042<br />
| [[FRDU:GetFriendFavoriteGame|GetFriendFavoriteGame]]<br />
|-<br />
| 0x001A00C4<br />
| [[FRDU:GetFriendInfo|GetFriendInfo]]<br />
|-<br />
| 0x001B0080<br />
| [[FRDU:IsIncludedInFriendList|IsIncludedInFriendList]]<br />
|-<br />
| 0x001C0042<br />
| [[FRDU:UnscrambleLocalFriendCode|UnscrambleLocalFriendCode]]<br />
|-<br />
| 0x001D0002<br />
| [[FRDU:UpdateGameModeDescription|UpdateGameModeDescription]]<br />
|-<br />
| 0x001E02C2<br />
| [[FRDU:UpdateGameMode|UpdateGameMode]]<br />
|-<br />
| 0x001F0042<br />
| [[FRDU:SendInvitation|SendInvitation]]<br />
|-<br />
| 0x00200002<br />
| [[FRDU:AttachToEventNotification|AttachToEventNotification]]<br />
|-<br />
| 0x00210040<br />
| [[FRDU:SetNotificationMask|SetNotificationMask]]<br />
|-<br />
| 0x00220040<br />
| [[FRDU:GetEventNotification|GetEventNotification]]<br />
|-<br />
| 0x00230000<br />
| [[FRDU:GetLastResponseResult|GetLastResponseResult]]<br />
|-<br />
| 0x00240040<br />
| [[FRDU:PrincipalIdToFriendCode|PrincipalIdToFriendCode]]<br />
|-<br />
| 0x00250080<br />
| [[FRDU:FriendCodeToPrincipalId|FriendCodeToPrincipalId]]<br />
|-<br />
| 0x00260080<br />
| [[FRDU:IsValidFriendCode|IsValidFriendCode]]<br />
|-<br />
| 0x00270040<br />
| [[FRDU:ResultToErrorCode|ResultToErrorCode]]<br />
|-<br />
| 0x00280244<br />
| [[FRDU:RequestGameAuthentication|RequestGameAuthentication]]<br />
|-<br />
| 0x00290000<br />
| [[FRDU:GetGameAuthenticationData|GetGameAuthenticationData]]<br />
|-<br />
| 0x002A0204<br />
| [[FRDU:RequestServiceLocator|RequestServiceLocator]]<br />
|-<br />
| 0x002B0000<br />
| [[FRDU:GetServiceLocatorData|GetServiceLocatorData]]<br />
|-<br />
| 0x002C0002<br />
| [[FRDU:DetectNatProperties|DetectNatProperties]]<br />
|-<br />
| 0x002D0000<br />
| [[FRDU:GetNatProperties|GetNatProperties]]<br />
|-<br />
| 0x002E0000<br />
| [[FRDU:GetServerTimeInterval|GetServerTimeInterval]]<br />
|-<br />
| 0x002F0040<br />
| [[FRDU:AllowHalfAwake|AllowHalfAwake]]<br />
|-<br />
| 0x00300000<br />
| [[FRDU:GetServerTypes|GetServerTypes]]<br />
|-<br />
| 0x00310082<br />
| [[FRDU:GetFriendComment|GetFriendComment]]<br />
|-<br />
| 0x00320042<br />
| [[FRDU:SetClientSdkVersion|SetClientSdkVersion]]<br />
|-<br />
| 0x00330000<br />
| [[FRDU:GetMyApproachContext|GetMyApproachContext]]<br />
|-<br />
| 0x00340046<br />
| [[FRDU:AddFriendWithApproach|AddFriendWithApproach]]<br />
|-<br />
| 0x00350082<br />
| [[FRDU:DecryptApproachContext|DecryptApproachContext]]<br />
|}<br />
<br />
= "frd:n" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x00010000<br />
| ?<br />
|-<br />
| 0x00020000<br />
| ?<br />
|-<br />
| 0x00030040<br />
| ?<br />
|-<br />
| 0x00040000<br />
| ?<br />
|}<br />
<br />
= "frd:a" =<br />
<br />
=HTTPS Requests=<br />
<br />
==Trusted RootCAs==<br />
No RootCertChain(s) are used. For the nasc site, friends-module uses [[HTTPC:AddDefaultCert]] with the following certIDs: 0x1, 0x2, and 0x3.</div>Reihttps://www.3dbrew.org/w/index.php?title=ClCertA&diff=15959ClCertA2016-03-01T19:13:51Z<p>Rei: </p>
<hr />
<div>This [[NCCH#CFA|CFA]] (title id: [[Title_list#0004001B_-_System_Data_Archives|0004001b00010002]]) contains the following [[PSPXI:EncryptDecryptAes|encrypted]] files in the RomFS:<br />
* "ctr-common-1-cert.bin", this is the default SSL client cert used by the SSL module in DER format.<br />
* "ctr-common-1-key.bin", this is the default SSL client private key used by the SSL module in DER format.<br />
<br />
For retail this is the "CTR Common Prod 1" cert.<br />
<br />
Each file is encrypted in CBC mode. The first 16 bytes of each file are the IV for decrypting the rest of the file.<br />
<br />
The following servers require usage of ClCertA to connect:<br />
<br />
* https://account.nintendo.net/ (Account/OAuth2 related)<br />
* https://ccif.ctr.shop.nintendo.net/ (CreditCardInfo(?), used for credit card/transaction related stuff)<br />
* https://ecs.c.shop.nintendowifi.net/ (ECommerce SOAP, ticket-related)<br />
* https://cas.c.shop.nintendowifi.net/ (Cataloging SOAP)<br />
* https://ninja.ctr.shop.nintendo.net/ (eShop-related)<br />
* https://nus.c.shop.nintendowifi.net/ (NetUpdate SOAP, used by [[NIM_Services|nim system module]])</div>Reihttps://www.3dbrew.org/w/index.php?title=3DS_Development_Unit_Software&diff=144923DS Development Unit Software2015-11-05T23:24:51Z<p>Rei: </p>
<hr />
<div>The following is a description of the functions what is possible with the applications unique to 3DS Development Units.<br />
<br />
For information on 3DS Development Hardware see [http://gbatemp.net/topic/327858-3ds-development-hardware/]<br />
[[File:CTR_HMN_DEV.png|300px|thumb|right|Beautifully clear picture of the Dev Apps + Home Menu. Click to view in great quality. - Xcution]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
=CTR-SDK=<br />
Descriptions Derived from SDK 2.3.4 except where notified otherwise. <br />
<br />
== Dev Menu == <br />
[[File:Devmenuicon.png]]<br />
<br />
[[File:Devmenscnsht.jpg|250px|thumb|right|Dev Menu Screenshots]]<br />
[[File:Old_Dev_Menu.png|200px|thumb|left|Old Dev Menu Screenshot]]<br />
This application on the top screen displays the firmware and revision of the Dev Menu, the free space available on the [[Flash Filesystem#TWL partition|TWL(DSi) NAND partition]] and [[SD Filesystem|SD card]] if present. It also provides information on the current file or device selected, as well as navigation instructions for the bottom screen.The bottom screen has three different windows, which are:<br />
<br />
*Programs- From this window, applications can be loaded from the [[Flash Filesystem|NAND]], the [[SD Filesystem|SD card]] and the slot 1 card (only a select scope of applications, see below for Dev Menu revisions and their corresponding scope of applications) . This is shown in the format of "Unique Id' '[[Serials#Product Code|Product Code]]'". Installed titles can be deleted from this menu.<br />
<br />
*Import- From this window, titles compiled in the format of a .[[CIA]] file, can be installed from the SD card. In later revisions this was renamed to ''SDMC''.<br />
<br />
*HIO- A tab available in later revisions of the Dev Menu. Used for installing CIAs stored on the host PC, this is supported by hio services, and hio daemon on the host PC.<br />
<br />
*ExtData- From this window, the 3DS's [[Extdata|ExtData]](this includes all ExtData) can be deleted<br />
<br />
(Note that retail 3ds games are not recognised by Developer 3DSs and the Dev Menu prints "Unknown Card" in the 'Programs' window and shows no details on top screen)<br />
<br />
(Also note that if a 3ds executable cannot be launched from the Dev Menu due to restrictive flags in the executable, such as restrictive memory, the product ID will be coloured red as opposed to black)<br />
<br />
While performing a manual update with CIAs on a dev unit, pressing Start + Y while highlighting the NATIVE_FIRM CIA will trigger an option to update firmware, thus allowing a downgrade.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! SDK Version<br />
! Titles Accessible<br />
|-<br />
| 0.9.2 - 0.13.2<br />
| Applications(NAND), System Applications , TWL Titles<br />
|- <br />
| 0.14.0 - 1.1.0<br />
| Dev NAND Applications, System Applications , TWL Titles<br />
|- <br />
| 1.2.0 - 2.0.0<br />
| Dev NAND Applications, DSiWare<br />
|-<br />
| 2.1.0 - 2.4.0<br />
| Applications(SD), Dev NAND Applications, DSiWare<br />
|-<br />
| 3.0.0 - 3.1.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare<br />
|-<br />
| 3.2.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser<br />
|-<br />
| 3.3.0 - Recent<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser, TwlNandFiler <br />
|}<br />
<br />
== Config == <br />
[[File:Configicon.png]]<br />
<br />
[[File:3DS_dev_configmenu.JPG|250px|thumb|right|Config Menu Screenshot]]<br />
[[File:Dev config.jpg|250px|thumb|right|Newer Config Menu Screenshot]]<br />
This application is a configuration menu for the 3DS, which has the following options:<br />
<br />
*Reset Settings - Resets all settings to default.<br />
<br />
*Hid Setting - (human interface device) Calibrates Touch-Pad and Analog stick.<br />
<br />
*Rtc Setting - (real time clock) Sets system time.<br />
<br />
*Lcd Setting - Sets display settings as found in the home menu as well as Flicker settings.<br />
<br />
*User Info Setting - Allows username change and "NG NAME FLAG" to be set to true or false.<br />
<br />
:In later versions of Config, "User Info Setting" also has :<br />
::*CountryId - Changes 3DS between installed countries.<br />
::*RegionId - Changes between the location in the selected country.<br />
<br />
*Other Setting(branches off into other settings) - <br />
:*Sound Mode - mono/stereo/surround<br />
<br />
:*System Mode - Changes Memory Allowance.<br />
::*Prod - 64MB Memory mode ([[Home Menu]] can usually only run in this mode and ''most'' retail-looking units cannot switch out of this mode)<br />
::*Dev1 - 96MB Memory mode<br />
::*Dev2 - 80MB Memory mode<br />
::*Dev3 - 72MB Memory mode<br />
::*Dev4 - 32MB Memory mode<br />
::All CTR Debuggers/Prototype units can change memory allowance. For Developer Test Units, the ability to change Memory Allowance, appears to be dependent on an option when buying the Test Unit. (similar to having a choice to purchase IS_Nitro's Wireless/USG options when buying an IS_Nitro from Nintendo)<br />
::On some Test Units, it's possible to run the [[Home Menu]] outside of Prod. However, software with limited memory (such as the web browser) cannot be launched from the home menu if the home menu is outside of Prod.<br />
<br />
:*Exception handler - Selects whether to enable or disable the application's handling of exceptions that arise in the non-debug environment - enable/disable <br />
<br />
:*Break Stop - (enable/disable) - Selects whether to enable or disable stopping the application when a break is encountered in the non-debug environment. If the application is not made to stop, it quits on a break.<br />
<br />
:*Menu - (Home Menu/Test Menu) This function edits the [[Config_Savegame|configuration]] field containing the menu TID for dev units, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module.<br />
<br />
:*Language - same options found in the Language section of [[System Settings]] but also has an "invalid" option<br />
<br />
:*Dlp Force Child Import - (enable/disable) - normally the 3ds caches downloaded "Download Play (Dlp)" applications on the nand and only re-downloads, overwriting the cached copy if the version application being requested to downloaded is higher than what is currently present on the nand. Enabling this option forces the 3ds to download and overwrite the cached copy on the nand, regardless of the version of the application being downloaded. This is of course for testing purposes.<br />
<br />
:*Debug Mode - (enable/disable) - Toggles Debug environment?<br />
<br />
:In later versions of Config, "Other Setting" also has :<br />
::*FS Latency Emulation - Filesystem Latency, in milliseconds (0ms-2550ms). Selection is in increments of 10. (ie 0ms->10ms->20ms...)<br />
::*Coppacs Setting - Unknown (stuck on 'not restricted')<br />
::*Olv Access Key - Unknown (default 0)<br />
<br />
*Test Setting - Test calibration of touch pad and joystick<br />
<br />
*Eula Setting - Allows user to change "Agree Version" namely:"ff.ff" the two symbol sets are interchangeable with combination variations from aa to 99 (default is 00.00 where the Eula is not accepted yet).<br />
<br />
*Stereo Camera Cal for Check - Camera test (?) as options to "write strange data(excess Z-rot) and "reset to factory default".<br />
<br />
*Gyro / Accel Cal for Check - Allows Gyro and Accelerometer to be calibrated.<br />
<br />
*Ctr Info Setting - Changes settings to that found on the ctrsetting.txt on an SD .<br />
<br />
== Downloadplay Client ==<br />
[[File:Dlpcliscnsht.jpg|250px|thumb|right|Downloadplay Client Screenshots]]<br />
[[File:Dlpcliicon.png]]<br />
<br />
<br />
Even though a Developer 3DS has a "Download Play" application visually identical to the retail 3DS [[Download Play|application]], the "Downloadplay Client" application can be installed as an alternative to the regular Download Play application. (Note: a Developer 3DS' and Retail 3DS' cannot receive download play 'children' from each-other.) This Developer application is a stripped down version of 'Download Play' which has the following options and limitations:<br />
<br />
*It can only download 3ds download play titles<br />
<br />
*Scraps the GUI found in the normal Download Play application(see screenshot)<br />
<br />
*Can select from a maximum of 16 Download play 'servers'<br />
<br />
This application is clearly used for easy testing of download play 'child' apps, without the hassle of constantly re-navigating the normal Download Play interface<br />
<br />
<br />
<br />
<br />
<br />
== Network Settings ==<br />
[[File:Netsetscnsht.jpg|250px|thumb|right|Network Settings Screenshots]]<br />
[[File:Netseticon.png]]<br />
<br />
This Developer application allows the users to directly modify the following from any of the three possible network setting 'slots'<br />
<br />
*Security Mode :(the wireless encryption the network is using) OPEN/WEP 40bit/WEP 104bit/128bit/WPA TKIP/WPA2 TKIP/WPA AES/WPA2 AES<br />
<br />
*SSID :(self-explanitory) maximum 32 characters<br />
<br />
*KEY :(the key for the encrytion is here in plain text) the maximum length depends on encryption type<br />
<br />
*AutoDNS :(whether the 3DS obtains the DNS automatically or not) |True-3DS obtains the DNS automatically|False-3DS uses the DNS server address provided by the user(it is possible to edit this here)|<br />
<br />
At the bottom of the setting options there are two choices:<br />
<br />
*Write Setting & Connect Test To AP - Applies the settings above and performs a connection test(note any settings made in system settings for this connection, which are not present in the above settings will be nullified, for example any proxy server settings)<br />
<br />
*Remove Setting - removes all settings for this 'slot'<br />
<br />
<br />
<br />
<br />
== SaveDataFiler ==<br />
[[File:Saveflscnsht.jpg|250px|thumb|right|SaveDataFiler Screenshots]]<br />
[[File:Saveflicon.png]]<br />
<br />
<br />
<br />
This 3DS Developer application allows save files and extdata to be exported and imported from an SD Card. The window has three tabs:<br />
<br />
*User - This is where saves for 3DS applications and saves on 3DS Game Cards(not DS Game Cards) can be exported to the SD Card. Saves cannot be deleted here.<br />
<br />
*ExtData - This is where application extdata can be deleted or exported to the SD Card for later use<br />
<br />
*SD - This is where extdata and application saves on the SD Card can be imported to the 3DS or 3DS Game Card. Also extdata and application saves can be deleted from the SD Card<br />
<br />
<br />
User save data is exported to sdmc:/filer/UserSaveData/YYYYMMDD(Hour)(Minute)(Second)<br />
<br />
<br />
It creates a folder in that path and 3 files. The 2 files exported to the above path are <uniqueID>.dat and <uniqueID>_.dat while a folder named /<uniqueID>/ in that path contains <ExHeader Name>.dat<br />
<br />
== CTR MenuSelector ==<br />
[[File:MenuSelector.png|120px|thumb|right|Menu Selector Screenshot]]<br />
[[File:Menuselectoricon.jpg]]<br />
<br />
This application when loaded can change the current 'Active Menu'(being used at the moment) by editing the menu TID [[Config_Savegame|configuration]] field, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module. <br />
With the release of SDK 1.1.0, this application was superseded by the introduction of the "Menu" choice in the [[3DS Development Unit Software#Config|Config Menu]] and consequently removed as a standard application.<br />
<br />
== CecLotcheckTool ==<br />
[[File:Ceclotscnsht.jpg|250px|thumb|right|CecLotcheckTool Screenshot]]<br />
[[File:Cecloticon.png]]<br />
<br />
This application is used to manage CECs (Chance Encounter Communications, AKA StreetPass hits) for any of the twelve possible applications used on the 3DS, if there are any. The application has twelve possible slots which can be filled by BOXes . The BOXes are individual applications which are permitted by the user to use CECs, such as StreetPass Mii Plaza or Nintendo 3DS Sound. And as such, the boxes in this application correspond to the applications in 'StreetPass Management', in 'System Settings' (StreetPass Management is accessible from retail 3DSs). The functions of this application:<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
*<Y> BOX Options - this opens up a sub menu with the following options(when hovering over Nintendo 3DS Sounds BOX - the only one I can test the app with):<br />
<br />
*Box Info - Gives the Out-Box parameters [[File:Boxinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Message Info (OUT-BOX) - Gives the Message Parameters For the current BOX [[File:Mesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Dummy Message Settings - Not quite sure what the options do here [[File:Dummesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*<A> Create Dummy BOXes - Creates dummy BOXes to fill any unused slots. (does not overwrite any present slots)<br />
<br />
*<X> Delete BOXes - Deletes all of the BOXes from the slots.<br />
<br />
*<START> CEC Filter Reset - I can only guess that it erases data collected by CEC enabled apps.<br />
<br />
<br />
<br />
== BossLotCheckTool ==<br />
[[File:Bosslcscnsht.png|100px|thumb|right|BossLotCheckTool Screenshot]]<br />
[[File:Bosslcicon.png]]<br />
<br />
This application is used to manage BOSS (SpotPass) tasks/data for 3DS titles which utilise BOSS communications. 'Pokedex' is an application which utilizes BOSS comunications. This application also displays the 3DS's friend code, although this code is not to be confused with the 3DS's Friend Card code found in 'Friends List'. The user can browse by unique ID the 3DS titles(excluding system titles) registered to use BOSS. For each title you can view details about the downloaded 'NsData' which accompanies BOSS downloads, view the BOSS task lists (implies applications can perform more than one BOSS task). You can also view various details about each BOSS task, including:<br />
<br />
TaskStatus : DONE?<br />
TaskExecCount : How many times the BOSS task has been executed<br />
TaskExecInterval : Period of time (in seconds) in the task is to be executed, in intervals<br />
TaskPriority : Is a number value <br />
URL : The URL to the BOSS content<br />
AP Info : NONE?<br />
TaskResultCode : Success or not<br />
HTTP_StatusCode : Self explanatory <br />
DataSize : Size of Content (in bytes)<br />
Last_Modified : Last time the BOSS content (on server) was modified<br />
StartTime : when the BOSS task was registered<br />
OptOut : Whether the user can/has opted out of BOSS communication for this task<br />
<br />
It also possible to manually execute the BOSS task from here<br />
<br />
== Stereo Camera Calibrator ==<br />
[[File:Stecamscnsht.png|100px|thumb|right|Stereo Camera Calibrator Screenshot]]<br />
[[File:Stecamicon.png]]<br />
<br />
The Stereo Camera Calibrator (SCC), in a nutshell, allows the user to adjust the configuration of the outer cameras in relation to each other. It can be configured automatically by positioning the 3DS a set distance away from a special chart. It can also be configured manually, by setting the rotation of each camera image and the size of the right eye camera. The 3D effect can be perceived by superimposing the right eye camera image translucently with the left eye camera image or by viewing the 3D image directly by use of the parallax barrier in the 3DS Screen. <br />
<br />
<br />
<br />
== Model Viewer ==<br />
[[File:ModelViewer.png|100px|thumb|right|3DS Model Viewer Screenshot]]<br />
[[File:ModelViewericon.png]]<br />
<br />
As the name suggests this application allows the user to view models. It is supposed to be used with a CTR-Debugger, assumingly so models can be entered in the memory of the program. But the program can be used on Test Units, but the model is restricted to three coloured lines depicting the 3 dimensions (x,y,z). The model can be viewed from any angle or scale, the perspective is controlled by the circle pad and directional buttons. And of course the application utilises the 3D effect<br />
<br />
<br />
<br />
<br />
== Friend Testing Partner ==<br />
[[File:Ftestpscnsht.png|250px|thumb|right|Friend Testing Partner Screenshot]]<br />
[[File:Ftestpicon.png]]<br />
<br />
The Friend Testing Partner application is used to test/monitor the 3DS's Friend List function. It allows the user to test various functions of the 3DS's out-going Friend Card, by giving the following options:<br />
*Master Control - (RUN/STOP) (STOP is the default setting) when ‘STOP’ is selected the 3DS Friend Card uses the user’s settings/data. When ‘RUN’ is selected the 3DS Friend Card uses the dummy settings/data chosen to test from the settings bellow.<br />
<br />
*Login/Logout - (ON/OFF) (ON is the default setting) What effect this has on the Friend Card is not known<br />
<br />
*Playing Title - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the currently used title is ignored and a dummy applications are cycled through as the ‘Playing Title’ approximately every ten seconds in its place. The dummy applications used are the applications found in Firmware version 1.0.0-0 of a retail 3DS including the ‘Nintendo Zone viewer’ app. When ‘OFF’ is selected the currently used title (which is the Friend Testing Partner app) is used as the ‘Playing Title’<br />
<br />
*Mode Description - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the Software in Use(Playing Title) is accompanied by the Date and Time found on that user’s 3DS. The Mode Description is refreshed every ten or so seconds. When ‘OFF’ is selected the date and time on the user’s 3DS is not displayed.<br />
<br />
*Message - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the message made by the user is replaced(not overwritten as it reverts back to the user’s choice when this is ‘OFF’) by the current date and time in the format “YYYYMMDD HHMMSS”, this is refreshed every ten or so seconds.<br />
<br />
*Mii - (ON/OFF) (ON is the default setting) When 'ON' the currently used Mii is replaced with one of 4 dummy Miis and cycles them through every ten seconds with a new dummy mii. This effect can only be seen from another 3DS not the host<br />
<br />
*Favorite Title (ON/OFF) (ON is the default setting) When 'ON' is selected, the user’s favorite title is replaced with a dummy, which is replaced every 10 or so seconds. <br />
Also this application allows the user to monitor the whether the 3DS is online or not and whether the 3DS’s Friend Presence is online or offline. Every time a dummy setting is refreshed it is displayed on the top screen with a time stamp.<br />
<br />
<br />
<br />
== Game Coin Setter ==<br />
[[File:Coinstscnsht.png|100px|thumb|right|Game Coin Setter Screenshot]]<br />
[[File:Coinsticon.png]] <br />
<br />
This application is used to set the Play Coin count on the 3DS. Obviously this was created so a developer can test parts of their game in which the player can exchange earned play coins for in-game content or similar. It has a very simple interface showing the current play coin count and the adjustable option, the target coin count. These are the controls with explanation of each:<br />
<br />
*LEFT/RIGHT - using the D-pad only to adjust the 'Target Count' to a number between 0-300.<br />
<br />
*A - Sets the 'Current Count' (amount of play coins the system has) to the user selected 'Target Count' (the user specified amount of play coins)<br />
<br />
*L+R+X - "Preclude today's Increment" This is fairly complicated...This either removes all coins added today, or removes all coins added previously starting the day before. Then it allows you to add more (with the value you set). This is more of a theory, it is poorly translated and this option isn't very useful anyway. Do yourself a favor and just give yourself millions of coins so you can buy all the fun stuff. :)<br />
<br />
== TWL Development Tools ==<br />
<br />
These are DSi/DS mode development tools repackaged into a [[CIA]], for installing to the TWL NAND.<br />
<br />
=== NINTENDO DS - WMtest ===<br />
[[File:Wmtestscnsht.jpg|300px|thumb|right|WMtest Screenshot]]<br />
[[File:Wmtesttool.png]]<br />
<br />
This application is a TWL(DSi) application compiled for use on the 3DS. It is an wireless test tool with its uses explained below:<br />
<br />
*Scan Test - Scans Wireless channels 1-13(can be focused on one specific channel) for broadcasting stations. It can detect two types of broadcasting stations:<br />
<br />
Wifi Access Points - Giving the Mac Address, Broadcasting Channel, 'c', and the SSID<br />
<br />
DS Stations such as DS Download stations and Pokemon distributors - Giving the Mac Address, Brodcasting Channel, TGID and GGID<br />
<br />
*ScanEx Test - and has two Scan Types. Passive which lets you individually scan channels 1-13 (only one at at time) and the DS distribution channels (1,7,13 all at once). And Active which scans all 13 channels at once. when it finds a channel it prints on the bottom screen next to 'Found' 'bssDescCount='<br />
<br />
*MeasureChannel Test - not quite sure what this does but it for a given channel it gives a ratio(in percentage form), which it finds in its allocated test time ranging from 10ms to 1000ms. And for every interval of time which is specified, it tests and gives a ratio.<br />
<br />
*Noise Mode - Seeks wireless channels in which to make wireless noise (This is not made very clear on the app). You can specify the:<br />
<br />
Channel where the scanner will seek to make noise<br />
<br />
Noise Rate, ranging from 0% to 100%<br />
<br />
Frequency, ranging from 10ms to 50ms<br />
<br />
Seek Mode, ranging from 1000ms to 1500ms<br />
<br />
When the settings are chosen the top screen has two counters which display 'Noise ON count' and 'Noise OFF count' the counters are affected by the noise rate. Starting at 0% the 'Noise ON count' does not change but as the Noise rate gets closer to 100% the count moves and gets faster as Noise rate reaches 100%. For 'Noise OFF count' it is the exact opposite to the ' Noise ON count' in regards to counting.<br />
<br />
=NW4C=<br />
NintendoWare for CTR is comprised of tools that deal with creating effects, fonts, models, layouts, sound, and text. There are CTR versions of some of the viewers.<br />
<br />
==H3D Model Viewer==<br />
[[File:H3Dscrnshot.png|180px|thumb|right|H3D Viewer Screenshot]]<br />
[[File:H3Dicon.png]]<br />
<br />
Used for viewing Binary CTR Models (.bcmdl). Models need to be loaded into memory via CTR-PARTNER. There is also a PC equivalent program with the same layout.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Layout Viewer==<br />
[[File:LYTscrnshot.png|180px|thumb|right|Layout Viewer bottom screen]]<br />
[[File:LYTicon.png]]<br />
<br />
Used for viewing Binary CTR Layouts (.bclyt). It is used with CTR-PARTNER to load layouts into RAM.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Effect Viewer==<br />
[[File:EFTscrnshot.png|180px|thumb|right|EffectViewer4C Screenshot]]<br />
[[File:EFTicon.png]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
=System Updaters=<br />
[[File:CSUscrnshot.png|300px|thumb|right|CSU Screenshot]]<br />
<br />
There are two kinds of system updaters for dev (panda) units, CTR System Updater (CSU) and SNAKE System Updater. As the names imply, the former is for original 3DS and the latter is for New 3DS. They are used to update the panda unit's 'firmware'/SDK Version. The romfs of the CSU contains the contents that will be installed to NAND. They contain all system titles as well as Devmenu and Config.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
----<br />
[[Category:3DS Development Unit Related Pages]]</div>Reihttps://www.3dbrew.org/w/index.php?title=File:CSUscrnshot.png&diff=14491File:CSUscrnshot.png2015-11-05T23:15:31Z<p>Rei: CSU screenshot</p>
<hr />
<div>CSU screenshot</div>Reihttps://www.3dbrew.org/w/index.php?title=File:EFTscrnshot.png&diff=14490File:EFTscrnshot.png2015-11-05T22:29:50Z<p>Rei: EffectViewer4C screentshot</p>
<hr />
<div>EffectViewer4C screentshot</div>Reihttps://www.3dbrew.org/w/index.php?title=File:EFTicon.png&diff=14489File:EFTicon.png2015-11-05T22:28:17Z<p>Rei: EffectViewer4C icon</p>
<hr />
<div>EffectViewer4C icon</div>Reihttps://www.3dbrew.org/w/index.php?title=File:LYTscrnshot.png&diff=14488File:LYTscrnshot.png2015-11-05T22:16:23Z<p>Rei: Layout Viewer Bottom screen</p>
<hr />
<div>Layout Viewer Bottom screen</div>Reihttps://www.3dbrew.org/w/index.php?title=File:LYTicon.png&diff=14487File:LYTicon.png2015-11-05T22:14:30Z<p>Rei: Layout Viewer icon</p>
<hr />
<div>Layout Viewer icon</div>Reihttps://www.3dbrew.org/w/index.php?title=File:H3Dicon.png&diff=14486File:H3Dicon.png2015-11-05T22:11:42Z<p>Rei: NW4C icon</p>
<hr />
<div>NW4C icon</div>Reihttps://www.3dbrew.org/w/index.php?title=File:H3Dscrnshot.png&diff=14485File:H3Dscrnshot.png2015-11-05T21:49:53Z<p>Rei: H3D Viewer for CTR</p>
<hr />
<div>H3D Viewer for CTR</div>Reihttps://www.3dbrew.org/w/index.php?title=EShop&diff=14112EShop2015-10-20T04:45:04Z<p>Rei: /* ninja */</p>
<hr />
<div>The Nintendo 3DS eShop was added in the June 2011 update for JP/EUR/USA.<br />
<br />
From here, you can download Virtual Console games, 3D Classics, DSiware software, view screenshots, and 3D trailers for upcoming 3DS titles.<br />
<br />
While eShop is loading, eShop will use command [[NIMS:CheckSysupdateAvailableSOAP]]. If a system update is available where title installation for system titles still needs finalized (or when the updated titles were not downloaded at all), eShop will then display the "system update is available" message.<br />
<br />
The eShop application uses command [[AMNet:FinishInstallToMedia]] to finalize the SD title install (if the whole title is downloaded while eShop is still running), however, before using that command the eShop application also uses [[AMNet:FinishInstallToMedia]] to finalize installing all system titles (from system updates).<br />
<br />
== eShop QR Codes ==<br />
eShop QR Codes can be scanned with the camera, allowing one to quickly navigate to the desired eShop title with just two clicks. The QR Codes themselves is a simple text/url QR, started with "ESHOP://" string followed by a decimal eShop content link id(same IDs used internally by eShop for all content) and then some special data, delimited by a dot symbol, which can be ommited.<br />
<br />
In order for the QR-code string data to be valid for eShop, it must begin with "ESHOP://5", with the first ID being all decimal.<br />
<br />
{| class="wikitable"<br />
|-<br />
! QR Code source<br />
! Region<br />
! Title<br />
! Serial<br />
! Title ID<br />
|-<br />
| ESHOP://50010000000201.PEAALL000000 || EUR || Nintendogs & Cats Demo || ADA/B/C || 0004000200030c01<br />
|-<br />
| ESHOP://50010000007870.PEAALL000000 || EUR || Crush 3D || A??P || 00040002<br />
|-<br />
| ESHOP://50010000008009.PEAALL000000 || EUR || Resident Evil Revelations Demo || ABRE || 000400020005ee01<br />
|-<br />
| ESHOP://50010000008123.J00101Z00095 || JPN || Rhythm Thief And The Emperor's Treasure Demo || ARTJ || 00040002<br />
|-<br />
| ESHOP://50010000008404.PEAALL000000 || EUR || Mario And Sonic At The London 2012 Olympic Games Demo || ACMP [http://mediacontent.nintendo-europe.com/NOE/images/game_content/ACMP-MarioAndSonicAtTheLondon2012OlympicGames-QRCode-EA_ALL_000_001.bmp] || 00040002<br />
|-<br />
| ESHOP://50010000008447.J00101Z00094 || JPN || Resident Evil Revelations Demo || ABRJ || 00040002<br />
|-<br />
| ESHOP://50010000008449.J00101Z00082 || JPN || Swapnote || JFRJ ||?<br />
|-<br />
| ESHOP://50010000008561 || USA || Swapnote || JFRE || 0004000000051700<br />
|-<br />
| ESHOP://50010000008647.J00101Z00096 || JPN || Metal Gear Solid Snake Eater 3D Demo || AMGJ || 0004000200048101<br />
|-<br />
| ESHOP://50010000008648.J00101Z00097 || JPN || Theatrythm Final Fantasy || ATHJ ||?<br />
|-<br />
| ESHOP://50010000008782.PEAALL000000 || EUR || Metal Gear Solid Snake Eater 3D Demo || AMGE || 0004000200082401<br />
|-<br />
| ESHOP://50010000008842.PEAALL000000 || EUR || Rhythm Thief And The Emperor's Treasure Demo || ARTP [http://mediacontent.nintendo-europe.com/NOE/images/game_content/ARTP-RhythmThief_TheEmperorsTreasure-QRCode-EA_ALL_000_001.bmp] || 00040002<br />
|-<br />
| ESHOP://50010000009084.J00101Z00121 || JPN || Hatsune Miku And Future Stars: Project Mirai Demo || AM9J || 00040002<br />
|-<br />
| ESHOP://50010000009102.J00101Z00106 || JPN || Denpa Ningen RPG || JD8J ||?<br />
|-<br />
| ESHOP://50010000009161.J00101Z00118 || JPN || Dillon's Rolling Western || JAMJ || 00040000<br />
|-<br />
| ESHOP://50010000009261 || USA || Dillon's Rolling Western || JAME? || 00040000<br />
|-<br />
| ESHOP://50010000009401.J00101Z00120 || JPN || Kingdom Hearts 3D Video Download || JZ8J ||?<br />
|-<br />
| ESHOP://50010000009403.J00101Z00119 || JPN || DQM 3D Video Download || JZ7J ||?<br />
|-<br />
| ESHOP://50010000009575.PEAALL000000 || EUR || Kid Icarus: Of Myths And Monsters (Virtual Console) ||? ||?<br />
|-<br />
| ESHOP://50010000009846 || USA || Ketzal's Corridors ||? ||?<br />
|}<br />
<br />
* New QR Code for Japanese "Photos with Super Mario" has a different code string: ESHOP://50010000013120.J00108Z00001.CD588EAE95A3A68D15C647DA2AC0945FD88F70AB8A31149E51C4B05FB927B0B8<br />
<br />
* There is a link in the Japanese eShop <nowiki>[http://www.nintendo.co.jp/3ds/eshop/qrCode.html?####]</nowiki> where you can replace the #### with the Japanese eShop title's serial and you will get it's QR code. (i.e. http://www.nintendo.co.jp/3ds/eshop/qrCode.html?jcaj will get you the pushmo QR code)<br />
<br />
* You could use Google's Chart API to create a QR code from the codes above: https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=ESHOP (replace the ESHOP text with the ESHOP:// link from one of the above)<br />
<br />
== NS eShop application parameters ==<br />
This section describes the 0x1C-byte structure stored at the application parameters from [[APT:StartApplication]], under the 0x300-byte buffer listed there.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Unknown, usually 0x3?<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Unknown, usually 0x0?<br />
|-<br />
| 0x8<br />
| 0x8<br />
| u64 binary eShop content ID, same ID from the first string in eShop QR-codes except in binary form.<br />
|-<br />
| 0x10<br />
| 0x10<br />
| This is the last string from the QR-code(if any), no NUL-termination.<br />
|}<br />
<br />
== ExtData ==<br />
The ExtData [[Extdata#Filesystem|File System]] for eShop is as follows:<br />
<br />
root<br />
├── icon<br />
├── boss<br />
│ └── TIGER100.tmp<br />
└── user<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! File<br />
! Details<br />
! Size<br />
! Firmware Introduced<br />
! Plain text<br />
|-<br />
| icon<br />
| Duplicate from application ExeFS. Always image 00000002<br />
| 0x36C0 Bytes<br />
| [[2.0.0-2]]<br />
| [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/eShopExtdata/icon Download_EUR]<br />
|-<br />
| TIGER100.tmp<br />
| Always image 00000003.<br />
| 0xCE47 bytes (varies?)<br />
| [[2.0.0-2]]<br />
| <br />
|}<br />
<br />
== Music ==<br />
The eShop pulls its music from a static, region-specific link in a format similar to the following: <br />
<br />
https:// a248.e.akamai.net/f/248/103046/10m/npdl.c.app.nintendowifi.net/p01/nsa/CtfKXACbUPl8s7lk/BGM1/US_BGM1 ,<br />
where region is one of the primary system regions (JP, US, EU, KR, etc.) Support also exists for 'BGM2', but this seems to be unused.<br />
The music is held in a [[SpotPass|BOSS]] container. <br />
<br />
The format consists of a brief XML header describing the audio (including the date it was set as the main eShop theme, loop times, size, etc) followed by a raw AAC stream. Tools such as FFmpeg can handle rebuilding this stream with ADTS headers for proper time info and such.<br />
<br />
The [[Home_Menu|Home Menu]] uses nearly the same format for the Theme Shop's background music.<br />
<br />
== URLs ==<br />
<br />
eShop uses the following domains over HTTPS:<br />
<br />
* cp3s-auth.c.shop.nintendowifi.net<br />
* a248.e.akamai.net<br />
* ninja.ctr.shop.nintendo.net<br />
* samurai.ctr.shop.nintendo.net<br />
* ccif.ctr.shop.nintendo.net<br />
* eou.c.shop.nintendowifi.net<br />
<br />
These domains are used by [[NIM_Services|NIM]]:<br />
<br />
* nus.c.shop.nintendowifi.net<br />
* ecs.c.shop.nintendowifi.net<br />
* cas.c.shop.nintendowifi.net<br />
<br />
ninja.ctr.shop.nintendo.net and samurai.ctr.shop.nintendo.net contain the bulk of the eShop information.<br />
<br />
=== Common Parameters to ninja and samurai ===<br />
<br />
For every request to the ninja and samurai servers, three parameters are always sent, though are not necessarily required:<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Parameter<br />
! Required<br />
! Description<br />
! Type<br />
! Normal value<br />
|-<br />
| shop_id<br />
| depends on the URL, usually no<br />
| Describes which eShop instance should be used. 1 indicates the 3DS eShop, 2 indicates the Wii U eShop. 3 seems to yield the same results as 2. Values greater than 3 or less than 1 are invalid. Defaults to 2 or 3 if not given.<br />
| unsigned integer<br />
| 1<br />
|-<br />
| lang<br />
| no<br />
| Describes the language. Seems to be an ISO 639-1 code in lower case. Every eShop region has a default language that is used if this parameter is not given. Some regions have multiple languages, such as CA (en and fr).<br />
| string (two characters)<br />
| depends on region and eShop settings; for US: en<br />
|-<br />
| _type<br />
| no<br />
| Describes whether the client wants to receive JSON or XML. This parameter seems actually unused and the servers always return XML.<br />
| string<br />
| json<br />
|}<br />
<br />
=== samurai ===<br />
<br />
samurai.ctr.shop.nintendo.net (samurai) provides metadata about titles. The samurai server provides the backend for the eShop title search.<br />
<br />
Common parameters described above can always be sent.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Path<br />
! Description<br />
! Parameters<br />
|-<br />
| /samurai/ws/'''region'''/titles<br />
| Fetches the title list, containing the content id (not the 3DS title id), the product code and the localized title name<br />
| All of these are optional.<br />
* genre[]: genre ID (unsigned int)<br />
* publisher[]: publisher ID (unsigned int)<br />
* price_min: minimum price in region currency (signed int)<br />
* price_max: maximum price in region currency (signed int)<br />
* video_format: "moflex"<br />
* freeword: keyword(s?) to look for (string)<br />
* limit: maximum results<br />
* offset: results to skip<br />
* sort: one of "new", "popular" or "score"<br />
* release_date_before: date/time title must have been released before (UNIX timestamp prefixed by +)<br />
* release_date_after: date/time title must have been released after (UNIX timestamp prefixed by -)<br />
|-<br />
| /samurai/ws/'''region'''/news<br />
| eShop news section<br />
| (none)<br />
|-<br />
| /samurai/ws/'''region'''/telops<br />
| Some kind of news?<br />
| shop_id is required<br />
|-<br />
| /samurai/ws/'''region'''/directory/'''(long long unsigned int)''' and /samurai/ws/'''region'''/directory/~'''(string)'''<br />
| (unknown)<br />
| (unknown)<br />
|-<br />
| /samurai/ws/'''region'''/title/'''content id'''<br />
| Returns information about the title, more verbose than /titles.<br />
| (none)<br />
|-<br />
| /samurai/ws/'''region'''/contents<br />
| Seems identical to /titles.<br />
| see /titles<br />
|-<br />
| /samurai/ws/'''region'''/genres<br />
| Returns a list of human-readable genre names and their corresponding genre id.<br />
| (none)<br />
|-<br />
| /samurai/ws/'''region'''/publishers<br />
| Returns a list of human-readable publisher names and their corresponding publisher id.<br />
| (none)<br />
|-<br />
| /samurai/ws/'''region'''/title/'''content id'''/aocs<br />
| Returns a list of add-on contents/downloadable content and prices in eShop region currency.<br />
| (none)<br />
|}<br />
<br />
=== ninja ===<br />
<br />
ninja.ctr.shop.nintendo.net (ninja) contains the seeds for the new 9.6 crypto, pricing information and handles actions that require authentication, such as purchases. Authentication information seems to be obtained from the [[ACT_Services|act:u sysmodule]] and works through OAuth2.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Path<br />
! Description<br />
! Parameters<br />
|-<br />
| /ninja/ws/'''region'''/title/'''content id'''/ec_info<br />
| Contains information about the title. Such as title id, content size, and if available, the 9.6 crypto seed<br />
| (none)<br />
|-<br />
| /ninja/ws/titles/id_pair<br />
| Provides the content id for the given title id<br />
| title_id[] is required.<br />
|-<br />
| /ninja/ws/'''region'''/tax_locations<br />
| Provides the tax location ID<br />
| postal_code is required.<br />
|-<br />
| /ninja/ws/service_hosts<br />
| Provides CCIF and Samurai servers<br />
| country and shop_id is required.<br />
|-<br />
| /ninja/ws/country/'''region'''<br />
| Various eshop related information for a given region<br />
| (none)<br />
|-<br />
| /ninja/ws/country/'''region'''/replenish_amounts<br />
| Provides the amounts of money you can replenish to your account.<br />
| (none)<br />
|}</div>Reihttps://www.3dbrew.org/w/index.php?title=3DS_Development_Unit_Software&diff=140323DS Development Unit Software2015-10-18T10:42:16Z<p>Rei: /* Config */</p>
<hr />
<div>The following is a description of the functions what is possible with the applications unique to 3DS Development Units.<br />
<br />
Descriptions Derived from SDK 2.3.4 except where notified otherwise. For information on 3DS Development Hardware see [http://gbatemp.net/topic/327858-3ds-development-hardware/]<br />
[[File:CTR_HMN_DEV.png|300px|thumb|right|Beautifully clear picture of the Dev Apps + Home Menu. Click to view in great quality. - Xcution]]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
== Dev Menu == <br />
[[File:Devmenuicon.png]]<br />
<br />
[[File:Devmenscnsht.jpg|250px|thumb|right|Dev Menu Screenshots]]<br />
[[File:Old_Dev_Menu.png|200px|thumb|left|Old Dev Menu Screenshot]]<br />
This application on the top screen displays the firmware and revision of the Dev Menu, the free space available on the [[Flash Filesystem#TWL partition|TWL(DSi) NAND partition]] and [[SD Filesystem|SD card]] if present. It also provides information on the current file or device selected, as well as navigation instructions for the bottom screen.The bottom screen has three different windows, which are:<br />
<br />
*Programs- From this window, applications can be loaded from the [[Flash Filesystem|NAND]], the [[SD Filesystem|SD card]] and the slot 1 card (only a select scope of applications, see below for Dev Menu revisions and their corresponding scope of applications) . This is shown in the format of "Unique Id' '[[Serials#Product Code|Product Code]]'". Installed titles can be deleted from this menu.<br />
<br />
*Import- From this window, titles compiled in the format of a .[[CIA]] file, can be installed from the SD card. In later revisions this was renamed to ''SDMC''.<br />
<br />
*HIO- A tab available in later revisions of the Dev Menu. Used for installing CIAs stored on the host PC, this is supported by hio services, and hio daemon on the host PC.<br />
<br />
*ExtData- From this window, the 3DS's [[Extdata|ExtData]](this includes all ExtData) can be deleted<br />
<br />
(Note that retail 3ds games are not recognised by Developer 3DSs and the Dev Menu prints "Unknown Card" in the 'Programs' window and shows no details on top screen)<br />
<br />
(Also note that if a 3ds executable cannot be launched from the Dev Menu due to restrictive flags in the executable, such as restrictive memory, the product ID will be coloured red as opposed to black)<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! SDK Version<br />
! Titles Accessible<br />
|-<br />
| 0.9.2 - 0.13.2<br />
| Applications(NAND), System Applications , TWL Titles<br />
|- <br />
| 0.14.0 - 1.1.0<br />
| Dev NAND Applications, System Applications , TWL Titles<br />
|- <br />
| 1.2.0 - 2.0.0<br />
| Dev NAND Applications, DSiWare<br />
|-<br />
| 2.1.0 - 2.4.0<br />
| Applications(SD), Dev NAND Applications, DSiWare<br />
|-<br />
| 3.0.0 - 3.1.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare<br />
|-<br />
| 3.2.0<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser<br />
|-<br />
| 3.3.0 - Recent<br />
| Applications(SD), Dev NAND Applications, Demos, DSiWare, WebBrowser, TwlNandFiler <br />
|}<br />
<br />
== Config == <br />
[[File:Configicon.png]]<br />
<br />
[[File:3DS_dev_configmenu.JPG|250px|thumb|right|Config Menu Screenshot]]<br />
[[File:Dev config.jpg|250px|thumb|right|Newer Config Menu Screenshot]]<br />
This application is a configuration menu for the 3DS, which has the following options:<br />
<br />
*Reset Settings - Resets all settings to default.<br />
<br />
*Hid Setting - (human interface device) Calibrates Touch-Pad and Analog stick.<br />
<br />
*Rtc Setting - (real time clock) Sets system time.<br />
<br />
*Lcd Setting - Sets display settings as found in the home menu as well as Flicker settings.<br />
<br />
*User Info Setting - Allows username change and "NG NAME FLAG" to be set to true or false.<br />
<br />
:In later versions of Config, "User Info Setting" also has :<br />
::*CountryId - Changes 3DS between installed countries.<br />
::*RegionId - Changes between the location in the selected country.<br />
<br />
*Other Setting(branches off into other settings) - <br />
:*Sound Mode - mono/stereo/surround<br />
<br />
:*System Mode - Changes Memory Allowance.<br />
::*Prod - 64MB Memory mode ([[Home Menu]] can usually only run in this mode and ''most'' retail-looking units cannot switch out of this mode)<br />
::*Dev1 - 96MB Memory mode<br />
::*Dev2 - 80MB Memory mode<br />
::*Dev3 - 72MB Memory mode<br />
::*Dev4 - 32MB Memory mode<br />
::All CTR Debuggers/Prototype units can change memory allowance. For Developer Test Units, the ability to change Memory Allowance, appears to be dependent on an option when buying the Test Unit. (similar to having a choice to purchase IS_Nitro's Wireless/USG options when buying an IS_Nitro from Nintendo)<br />
::On some Test Units, it's possible to run the [[Home Menu]] outside of Prod. However, software with limited memory (such as the web browser) cannot be launched from the home menu if the home menu is outside of Prod.<br />
<br />
:*Exception handler - Selects whether to enable or disable the application's handling of exceptions that arise in the non-debug environment - enable/disable <br />
<br />
:*Break Stop - (enable/disable) - Selects whether to enable or disable stopping the application when a break is encountered in the non-debug environment. If the application is not made to stop, it quits on a break.<br />
<br />
:*Menu - (Home Menu/Test Menu) This function edits the [[Config_Savegame|configuration]] field containing the menu TID for dev units, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module.<br />
<br />
:*Language - same options found in the Language section of [[System Settings]] but also has an "invalid" option<br />
<br />
:*Dlp Force Child Import - (enable/disable) - normally the 3ds caches downloaded "Download Play (Dlp)" applications on the nand and only re-downloads, overwriting the cached copy if the version application being requested to downloaded is higher than what is currently present on the nand. Enabling this option forces the 3ds to download and overwrite the cached copy on the nand, regardless of the version of the application being downloaded. This is of course for testing purposes.<br />
<br />
:*Debug Mode - (enable/disable) - Toggles Debug environment?<br />
<br />
:In later versions of Config, "Other Setting" also has :<br />
::*FS Latency Emulation - Filesystem Latency, in milliseconds (0ms-2550ms). Selection is in increments of 10. (ie 0ms->10ms->20ms...)<br />
::*Coppacs Setting - Unknown (stuck on 'not restricted')<br />
::*Olv Access Key - Unknown (default 0)<br />
<br />
*Test Setting - Test calibration of touch pad and joystick<br />
<br />
*Eula Setting - Allows user to change "Agree Version" namely:"ff.ff" the two symbol sets are interchangeable with combination variations from aa to 99 (default is 00.00 where the Eula is not accepted yet).<br />
<br />
*Stereo Camera Cal for Check - Camera test (?) as options to "write strange data(excess Z-rot) and "reset to factory default".<br />
<br />
*Gyro / Accel Cal for Check - Allows Gyro and Accelerometer to be calibrated.<br />
<br />
*Ctr Info Setting - Changes settings to that found on the ctrsetting.txt on an SD .<br />
<br />
== Downloadplay Client ==<br />
[[File:Dlpcliscnsht.jpg|250px|thumb|right|Downloadplay Client Screenshots]]<br />
[[File:Dlpcliicon.png]]<br />
<br />
<br />
Even though a Developer 3DS has a "Download Play" application visually identical to the retail 3DS [[Download Play|application]], the "Downloadplay Client" application can be installed as an alternative to the regular Download Play application. (Note: a Developer 3DS' and Retail 3DS' cannot receive download play 'children' from each-other.) This Developer application is a stripped down version of 'Download Play' which has the following options and limitations:<br />
<br />
*It can only download 3ds download play titles<br />
<br />
*Scraps the GUI found in the normal Download Play application(see screenshot)<br />
<br />
*Can select from a maximum of 16 Download play 'servers'<br />
<br />
This application is clearly used for easy testing of download play 'child' apps, without the hassle of constantly re-navigating the normal Download Play interface<br />
<br />
<br />
<br />
<br />
<br />
== Network Settings ==<br />
[[File:Netsetscnsht.jpg|250px|thumb|right|Network Settings Screenshots]]<br />
[[File:Netseticon.png]]<br />
<br />
This Developer application allows the users to directly modify the following from any of the three possible network setting 'slots'<br />
<br />
*Security Mode :(the wireless encryption the network is using) OPEN/WEP 40bit/WEP 104bit/128bit/WPA TKIP/WPA2 TKIP/WPA AES/WPA2 AES<br />
<br />
*SSID :(self-explanitory) maximum 32 characters<br />
<br />
*KEY :(the key for the encrytion is here in plain text) the maximum length depends on encryption type<br />
<br />
*AutoDNS :(whether the 3DS obtains the DNS automatically or not) |True-3DS obtains the DNS automatically|False-3DS uses the DNS server address provided by the user(it is possible to edit this here)|<br />
<br />
At the bottom of the setting options there are two choices:<br />
<br />
*Write Setting & Connect Test To AP - Applies the settings above and performs a connection test(note any settings made in system settings for this connection, which are not present in the above settings will be nullified, for example any proxy server settings)<br />
<br />
*Remove Setting - removes all settings for this 'slot'<br />
<br />
<br />
<br />
<br />
== SaveDataFiler ==<br />
[[File:Saveflscnsht.jpg|250px|thumb|right|SaveDataFiler Screenshots]]<br />
[[File:Saveflicon.png]]<br />
<br />
<br />
<br />
This 3DS Developer application allows save files and extdata to be exported and imported from an SD Card. The window has three tabs:<br />
<br />
*User - This is where saves for 3DS applications and saves on 3DS Game Cards(not DS Game Cards) can be exported to the SD Card. Saves cannot be deleted here.<br />
<br />
*ExtData - This is where application extdata can be deleted or exported to the SD Card for later use<br />
<br />
*SD - This is where extdata and application saves on the SD Card can be imported to the 3DS or 3DS Game Card. Also extdata and application saves can be deleted from the SD Card<br />
<br />
<br />
User save data is exported to sdmc:/filer/UserSaveData/YYYYMMDD(Hour)(Minute)(Second)<br />
<br />
<br />
It creates a folder in that path and 3 files. The 2 files exported to the above path are <uniqueID>.dat and <uniqueID>_.dat while a folder named /<uniqueID>/ in that path contains <ExHeader Name>.dat<br />
<br />
== CTR MenuSelector ==<br />
[[File:MenuSelector.png|120px|thumb|right|Menu Selector Screenshot]]<br />
[[File:Menuselectoricon.jpg]]<br />
<br />
This application when loaded can change the current 'Active Menu'(being used at the moment) by editing the menu TID [[Config_Savegame|configuration]] field, allowing the user to choose between the [[Home Menu]] or the [[3DS Development Unit GUI#Test Menu|Test Menu]], as the menu loaded by the [[NS]] module. <br />
With the release of SDK 1.1.0, this application was superseded by the introduction of the "Menu" choice in the [[3DS Development Unit Software#Config|Config Menu]] and consequently removed as a standard application.<br />
<br />
== CecLotcheckTool ==<br />
[[File:Ceclotscnsht.jpg|250px|thumb|right|CecLotcheckTool Screenshot]]<br />
[[File:Cecloticon.png]]<br />
<br />
This application is used to manage CECs (Chance Encounter Communications, AKA StreetPass hits) for any of the twelve possible applications used on the 3DS, if there are any. The application has twelve possible slots which can be filled by BOXes . The BOXes are individual applications which are permitted by the user to use CECs, such as StreetPass Mii Plaza or Nintendo 3DS Sound. And as such, the boxes in this application correspond to the applications in 'StreetPass Management', in 'System Settings' (StreetPass Management is accessible from retail 3DSs). The functions of this application:<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
*<Y> BOX Options - this opens up a sub menu with the following options(when hovering over Nintendo 3DS Sounds BOX - the only one I can test the app with):<br />
<br />
*Box Info - Gives the Out-Box parameters [[File:Boxinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Message Info (OUT-BOX) - Gives the Message Parameters For the current BOX [[File:Mesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*Dummy Message Settings - Not quite sure what the options do here [[File:Dummesinf.jpg|250px|]]<br />
<br />
<br />
<br />
<br />
*<A> Create Dummy BOXes - Creates dummy BOXes to fill any unused slots. (does not overwrite any present slots)<br />
<br />
*<X> Delete BOXes - Deletes all of the BOXes from the slots.<br />
<br />
*<START> CEC Filter Reset - I can only guess that it erases data collected by CEC enabled apps.<br />
<br />
<br />
<br />
== BossLotCheckTool ==<br />
[[File:Bosslcscnsht.png|100px|thumb|right|BossLotCheckTool Screenshot]]<br />
[[File:Bosslcicon.png]]<br />
<br />
This application is used to manage BOSS (SpotPass) tasks/data for 3DS titles which utilise BOSS communications. 'Pokedex' is an application which utilizes BOSS comunications. This application also displays the 3DS's friend code, although this code is not to be confused with the 3DS's Friend Card code found in 'Friends List'. The user can browse by unique ID the 3DS titles(excluding system titles) registered to use BOSS. For each title you can view details about the downloaded 'NsData' which accompanies BOSS downloads, view the BOSS task lists (implies applications can perform more than one BOSS task). You can also view various details about each BOSS task, including:<br />
<br />
TaskStatus : DONE?<br />
TaskExecCount : How many times the BOSS task has been executed<br />
TaskExecInterval : Period of time (in seconds) in the task is to be executed, in intervals<br />
TaskPriority : Is a number value <br />
URL : The URL to the BOSS content<br />
AP Info : NONE?<br />
TaskResultCode : Success or not<br />
HTTP_StatusCode : Self explanatory <br />
DataSize : Size of Content (in bytes)<br />
Last_Modified : Last time the BOSS content (on server) was modified<br />
StartTime : when the BOSS task was registered<br />
OptOut : Whether the user can/has opted out of BOSS communication for this task<br />
<br />
It also possible to manually execute the BOSS task from here<br />
<br />
== Stereo Camera Calibrator ==<br />
[[File:Stecamscnsht.png|100px|thumb|right|Stereo Camera Calibrator Screenshot]]<br />
[[File:Stecamicon.png]]<br />
<br />
The Stereo Camera Calibrator (SCC), in a nutshell, allows the user to adjust the configuration of the outer cameras in relation to each other. It can be configured automatically by positioning the 3DS a set distance away from a special chart. It can also be configured manually, by setting the rotation of each camera image and the size of the right eye camera. The 3D effect can be perceived by superimposing the right eye camera image translucently with the left eye camera image or by viewing the 3D image directly by use of the parallax barrier in the 3DS Screen. <br />
<br />
<br />
<br />
== Model Viewer ==<br />
[[File:ModelViewer.png|100px|thumb|right|3DS Model Viewer Screenshot]]<br />
[[File:ModelViewericon.png]]<br />
<br />
As the name suggests this application allows the user to view models. It is supposed to be used with a CTR-Debugger, assumingly so models can be entered in the memory of the program. But the program can be used on Test Units, but the model is restricted to three coloured lines depicting the 3 dimensions (x,y,z). The model can be viewed from any angle or scale, the perspective is controlled by the circle pad and directional buttons. And of course the application utilises the 3D effect<br />
<br />
<br />
<br />
<br />
== Friend Testing Partner ==<br />
[[File:Ftestpscnsht.png|250px|thumb|right|Friend Testing Partner Screenshot]]<br />
[[File:Ftestpicon.png]]<br />
<br />
The Friend Testing Partner application is used to test/monitor the 3DS's Friend List function. It allows the user to test various functions of the 3DS's out-going Friend Card, by giving the following options:<br />
*Master Control - (RUN/STOP) (STOP is the default setting) when ‘STOP’ is selected the 3DS Friend Card uses the user’s settings/data. When ‘RUN’ is selected the 3DS Friend Card uses the dummy settings/data chosen to test from the settings bellow.<br />
<br />
*Login/Logout - (ON/OFF) (ON is the default setting) What effect this has on the Friend Card is not known<br />
<br />
*Playing Title - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the currently used title is ignored and a dummy applications are cycled through as the ‘Playing Title’ approximately every ten seconds in its place. The dummy applications used are the applications found in Firmware version 1.0.0-0 of a retail 3DS including the ‘Nintendo Zone viewer’ app. When ‘OFF’ is selected the currently used title (which is the Friend Testing Partner app) is used as the ‘Playing Title’<br />
<br />
*Mode Description - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the Software in Use(Playing Title) is accompanied by the Date and Time found on that user’s 3DS. The Mode Description is refreshed every ten or so seconds. When ‘OFF’ is selected the date and time on the user’s 3DS is not displayed.<br />
<br />
*Message - (ON/OFF) (ON is the default setting) When ‘ON’ is selected the message made by the user is replaced(not overwritten as it reverts back to the user’s choice when this is ‘OFF’) by the current date and time in the format “YYYYMMDD HHMMSS”, this is refreshed every ten or so seconds.<br />
<br />
*Mii - (ON/OFF) (ON is the default setting) When 'ON' the currently used Mii is replaced with one of 4 dummy Miis and cycles them through every ten seconds with a new dummy mii. This effect can only be seen from another 3DS not the host<br />
<br />
*Favorite Title (ON/OFF) (ON is the default setting) When 'ON' is selected, the user’s favorite title is replaced with a dummy, which is replaced every 10 or so seconds. <br />
Also this application allows the user to monitor the whether the 3DS is online or not and whether the 3DS’s Friend Presence is online or offline. Every time a dummy setting is refreshed it is displayed on the top screen with a time stamp.<br />
<br />
<br />
<br />
== Game Coin Setter ==<br />
[[File:Coinstscnsht.png|100px|thumb|right|Game Coin Setter Screenshot]]<br />
[[File:Coinsticon.png]] <br />
<br />
This application is used to set the Play Coin count on the 3DS. Obviously this was created so a developer can test parts of their game in which the player can exchange earned play coins for in-game content or similar. It has a very simple interface showing the current play coin count and the adjustable option, the target coin count. These are the controls with explanation of each:<br />
<br />
*LEFT/RIGHT - using the D-pad only to adjust the 'Target Count' to a number between 0-300.<br />
<br />
*A - Sets the 'Current Count' (amount of play coins the system has) to the user selected 'Target Count' (the user specified amount of play coins)<br />
<br />
*L+R+X - "Preclude today's Increment" This is fairly complicated...This either removes all coins added today, or removes all coins added previously starting the day before. Then it allows you to add more (with the value you set). This is more of a theory, it is poorly translated and this option isn't very useful anyway. Do yourself a favor and just give yourself millions of coins so you can buy all the fun stuff. :)<br />
<br />
== TWL Development Tools ==<br />
<br />
These are DSi/DS mode development tools repackaged into a [[CIA]], for installing to the TWL NAND.<br />
<br />
=== NINTENDO DS - WMtest ===<br />
[[File:Wmtestscnsht.jpg|300px|thumb|right|WMtest Screenshot]]<br />
[[File:Wmtesttool.png]]<br />
<br />
This application is a TWL(DSi) application compiled for use on the 3DS. It is an wireless test tool with its uses explained below:<br />
<br />
*Scan Test - Scans Wireless channels 1-13(can be focused on one specific channel) for broadcasting stations. It can detect two types of broadcasting stations:<br />
<br />
Wifi Access Points - Giving the Mac Address, Broadcasting Channel, 'c', and the SSID<br />
<br />
DS Stations such as DS Download stations and Pokemon distributors - Giving the Mac Address, Brodcasting Channel, TGID and GGID<br />
<br />
*ScanEx Test - and has two Scan Types. Passive which lets you individually scan channels 1-13 (only one at at time) and the DS distribution channels (1,7,13 all at once). And Active which scans all 13 channels at once. when it finds a channel it prints on the bottom screen next to 'Found' 'bssDescCount='<br />
<br />
*MeasureChannel Test - not quite sure what this does but it for a given channel it gives a ratio(in percentage form), which it finds in its allocated test time ranging from 10ms to 1000ms. And for every interval of time which is specified, it tests and gives a ratio.<br />
<br />
*Noise Mode - Seeks wireless channels in which to make wireless noise (This is not made very clear on the app). You can specify the:<br />
<br />
Channel where the scanner will seek to make noise<br />
<br />
Noise Rate, ranging from 0% to 100%<br />
<br />
Frequency, ranging from 10ms to 50ms<br />
<br />
Seek Mode, ranging from 1000ms to 1500ms<br />
<br />
When the settings are chosen the top screen has two counters which display 'Noise ON count' and 'Noise OFF count' the counters are affected by the noise rate. Starting at 0% the 'Noise ON count' does not change but as the Noise rate gets closer to 100% the count moves and gets faster as Noise rate reaches 100%. For 'Noise OFF count' it is the exact opposite to the ' Noise ON count' in regards to counting.<br />
<br />
<br />
----<br />
[[Category:3DS Development Unit Related Pages]]</div>Reihttps://www.3dbrew.org/w/index.php?title=File:Dev_config.jpg&diff=14031File:Dev config.jpg2015-10-18T10:36:12Z<p>Rei: Dev unit config for SDK 11.3.0</p>
<hr />
<div>Dev unit config for SDK 11.3.0</div>Reihttps://www.3dbrew.org/w/index.php?title=Home_Menu/Themes&diff=11362Home Menu/Themes2015-01-04T06:08:42Z<p>Rei: /* Decompressed body_LZ.bin structure */</p>
<hr />
<div>This page describes the formats/structure of the data stored in RomFS for [[Home Menu]] DLC, for themes.<br />
<br />
=Control Content=<br />
The control content has content-index 0. It's unknown what if any of this is Home Menu specific.<br />
<br />
RomFS structure:<br />
* "MetaDataContentHeader.bin": Unknown, size is 0x44-bytes.<br />
* "ContentInfoArchive_<region>_<lang>.bin" Contains the list of ''all'' DLC content available under this DLC title(which can include DLC that's not yet accessible via the shop). <region> can be "USA", etc. <lang>, for the US title: "en", "es", "fr", and "pt".<br />
* "icons/<decimal_id>.icn" Contains the raw DLC icon image data, without any header. 48x48 tiled RGB565.<br />
<br />
ContentInfoArchive entry format, size 0xC8(this file contains the following entry for each of the DLC content):<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Content index - 1<br />
|-<br />
| 0x4<br />
| 0x4<br />
| 0x0 = disabled, 0x1 = enabled.<br />
|-<br />
| 0x8<br />
| 0x40<br />
| char string for the title text.<br />
|-<br />
| 0x48<br />
| 0x88<br />
| char string for the description text.<br />
|}<br />
<br />
The first entry is a "header": contentindex val=1, second word = <total DLC content excluding DLC control content>. The two strings are set to dummy text.<br />
<br />
=Theme Content=<br />
RomFS structure:<br />
* "bgm.bcstm": Background music, see [[CSTRM|here]].<br />
* "body_LZ.bin": LZ11 compressed blob containing the rest of the theme data(graphics + optional [[BCWAV|CWAVs]]).<br />
<br />
=Decompressed body_LZ.bin structure=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Version (Must be 1)<br />
|-<br />
| 0x4<br />
| 0x1<br />
| Unknown<br />
|-<br />
| 0x5<br />
| 0x1<br />
| 0 = disable usage of bgm.bcstm, non-zero = enable usage of bgm.bcstm.<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Normally zero(not used?).<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Must be <4. Top screen draw type: 0 = none, 1 = solid color(see below), 2 = extension of val1(see below), 3 = texture.<br />
|-<br />
| 0x10<br />
| 0x4<br />
| Top screen frame type, when draw-type is 3: 0 = texture1, 1 = texture0, 3 = texture1.<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Offset for the top screen solid color data.<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Top screen texture offset, see below.<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Additional top-screen texture offset, used with draw-type val2. This is optional when using draw-type val2.<br />
|-<br />
| 0x20<br />
| 0x4<br />
| Must be <4. Bottom screen draw type: 0 = none, 1 = solid color(see below), 2 = invalid, 3 = texture.<br />
|-<br />
| 0x24<br />
| 0x4<br />
| Bottom screen frame type, when draw-type is 3: 0 = texture4, 1 = texture2, 2 = texture3, 3 = texture4, 4 = texture3.<br />
|-<br />
| 0x28<br />
| 0x4<br />
| Bottom Screen Solid Color/Texture offset, see below.<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x30<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x34<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x38<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x3C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x40<br />
| 0x4<br />
| Offset to the data for texture6.<br />
|-<br />
| 0x44<br />
| 0x4<br />
| Offset to the data for texture7.<br />
|-<br />
| 0x48<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x4C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Offset to the data for texture8.<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Offset to the data for texture9.<br />
|-<br />
| 0x5C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Offset to a 0x9-byte block. (RGB colors for bottom screen arrows)<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Must be <3. 1 = enables usage of the following field.<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x80<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x84<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x88<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x8C<br />
| 0x4<br />
| Offset to a 0x9-byte block.<br />
|-<br />
| 0x90<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x94<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x98<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x9C<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0xA0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xA4<br />
| 0x4<br />
| Offset to a 0x15-byte block.<br />
|-<br />
| 0xA8<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xAC<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0xB0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xB4<br />
| 0x4<br />
| Offset to a 0x6-byte block.<br />
|-<br />
| 0xB8<br />
| 0x4<br />
| Must be <2. 1 = below audio data section is used, otherwise it's not used.<br />
|-<br />
| 0xBC<br />
| 0x4<br />
| Audio data section size, this must be <=0x2DC00.<br />
|-<br />
| 0xC0<br />
| 0x4<br />
| Offset for the audio data section.<br />
|}<br />
<br />
The filesize is aligned to 0x10-bytes. The filesize must be at least 0xC4-bytes, due to padding/alignment the first block of data after the header is normally located at 0xD0.<br />
<br />
With the solid-color data, there's 5-bytes located at the solid-color data offset. With draw-type val2, there's 7-bytes located here. The first 4-bytes located here is RGBA8888 pixel data, the rest is unknown.<br />
<br />
With draw-type val2, texture5 is also used(this likely isn't used for the entire top-screen). With draw-type val2, an extra texture with the same format/dimensions as texture5 can be used, when the additional texture offset field is set.<br />
<br />
==Frame Types==<br />
{| class="wikitable" border="1"<br />
|-<br />
! FrameType<br />
| Description<br />
|-<br />
| 2<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2<br />
|-<br />
| 4<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2 > 1<br />
|}<br />
<br />
==Textures==<br />
{| class="wikitable" border="1"<br />
|-<br />
! ID<br />
! Color format<br />
! Texture display dimensions<br />
! Texture data dimensions<br />
! Description<br />
|-<br />
| 0<br />
| Tiled RGB565<br />
| 412x240<br />
| 512x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 1<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 2<br />
| Tiled RGB565<br />
| 320x240<br />
| 512x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 3<br />
| Tiled RGB565<br />
| 960x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 4<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 5<br />
| Tiled A8<br />
| 64x64<br />
| 64x64<br />
| This is used with the top-screen when top-screen draw-type is val2, see above.<br />
|-<br />
| 6<br />
| Tiled BGR888<br />
| 74x64<br />
| 128x64<br />
| This is used for folder's on the main menu.<br />
|-<br />
| 7<br />
| Tiled BGR888<br />
| 82x64<br />
| 128x64<br />
| This is used for open folder's on the main menu.<br />
|-<br />
| 8<br />
| Tiled BGR888<br />
| 36x72<br />
| 64x128<br />
| This is used for 48x48 icon borders on the main menu.<br />
|-<br />
| 9<br />
| Tiled BGR888<br />
| 25x50<br />
| 32x64<br />
| This is used for 24x24 icon borders on the main menu.<br />
|}<br />
<br />
==Audio data section==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x8<br />
| <br />
| Beginning of the audio data entries.<br />
|}<br />
<br />
The audio data section contains the sound effects for this theme.<br />
<br />
Audio data entry structure:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| Y (see below)<br />
| Additional data for CWAV 6, see below.<br />
|-<br />
| Y + 0x0<br />
| 0x4<br />
| CWAV size.<br />
|-<br />
| Y + 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| Y + 0x8<br />
| X (see below)<br />
| Additional data for CWAV 4, see below.<br />
|-<br />
| Y + 0x8 + X<br />
| <br />
| [[BCWAV|CWAV]]<br />
|}<br />
<br />
<br />
Structure of the data starting at offset 0x0, from the above entry, for the additional data with CWAV 7:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| ?<br />
|}<br />
<br />
Y / the size of this block, is 0x10-bytes.<br />
<br />
Structure of the data starting at offset 0x8, from the above entry, for the additional data with CWAV 4:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x2C<br />
| ?<br />
|}<br />
<br />
X / the size of this block, is 0x2C-bytes.<br />
<br />
It's unknown how exactly the number of CWAVs is controlled. The CWAVs are used for the following:<br />
* 0: Cursor movement<br />
* 1: Application launch<br />
* 2: Certain buttons<br />
* 3: Cancel buttons<br />
* 4: When cursor would be moved off the screen, left/right<br />
* 5: When cursor is moved a screen-worth of icons across<br />
* 6: Folder buttons<br />
<br />
=Built-in themes=<br />
The built-in themes are stored at Home Menu RomFS:/theme/<Color>_LZ.bin, the format appears to be the same as body_LZ.bin in the theme DLC content.</div>Reihttps://www.3dbrew.org/w/index.php?title=Home_Menu/Themes&diff=11361Home Menu/Themes2015-01-04T06:02:27Z<p>Rei: Undo revision 11360 by Rei (talk)</p>
<hr />
<div>This page describes the formats/structure of the data stored in RomFS for [[Home Menu]] DLC, for themes.<br />
<br />
=Control Content=<br />
The control content has content-index 0. It's unknown what if any of this is Home Menu specific.<br />
<br />
RomFS structure:<br />
* "MetaDataContentHeader.bin": Unknown, size is 0x44-bytes.<br />
* "ContentInfoArchive_<region>_<lang>.bin" Contains the list of ''all'' DLC content available under this DLC title(which can include DLC that's not yet accessible via the shop). <region> can be "USA", etc. <lang>, for the US title: "en", "es", "fr", and "pt".<br />
* "icons/<decimal_id>.icn" Contains the raw DLC icon image data, without any header. 48x48 tiled RGB565.<br />
<br />
ContentInfoArchive entry format, size 0xC8(this file contains the following entry for each of the DLC content):<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Content index - 1<br />
|-<br />
| 0x4<br />
| 0x4<br />
| 0x0 = disabled, 0x1 = enabled.<br />
|-<br />
| 0x8<br />
| 0x40<br />
| char string for the title text.<br />
|-<br />
| 0x48<br />
| 0x88<br />
| char string for the description text.<br />
|}<br />
<br />
The first entry is a "header": contentindex val=1, second word = <total DLC content excluding DLC control content>. The two strings are set to dummy text.<br />
<br />
=Theme Content=<br />
RomFS structure:<br />
* "bgm.bcstm": Background music, see [[CSTRM|here]].<br />
* "body_LZ.bin": LZ11 compressed blob containing the rest of the theme data(graphics + optional [[BCWAV|CWAVs]]).<br />
<br />
=Decompressed body_LZ.bin structure=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Version (Must be 1)<br />
|-<br />
| 0x4<br />
| 0x1<br />
| Unknown<br />
|-<br />
| 0x5<br />
| 0x1<br />
| 0 = disable usage of bgm.bcstm, non-zero = enable usage of bgm.bcstm.<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Normally zero(not used?).<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Must be <4. Top screen draw type: 0 = none, 1 = solid color(see below), 2 = extension of val1(see below), 3 = texture.<br />
|-<br />
| 0x10<br />
| 0x4<br />
| Top screen frame type, when draw-type is 3: 0 = texture1, 1 = texture0, 3 = texture1.<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Offset for the top screen solid color data.<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Top screen texture offset, see below.<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Additional top-screen texture offset, used with draw-type val2. This is optional when using draw-type val2.<br />
|-<br />
| 0x20<br />
| 0x4<br />
| Must be <4. Bottom screen draw type: 0 = none, 1 = solid color(see below), 2 = invalid, 3 = texture.<br />
|-<br />
| 0x24<br />
| 0x4<br />
| Bottom screen frame type, when draw-type is 3: 0 = texture4, 1 = texture2, 2 = texture3, 3 = texture4, 4 = texture3.<br />
|-<br />
| 0x28<br />
| 0x4<br />
| Bottom Screen Solid Color/Texture offset, see below.<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x30<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x34<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x38<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x3C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x40<br />
| 0x4<br />
| Offset to the data for texture6.<br />
|-<br />
| 0x44<br />
| 0x4<br />
| Offset to the data for texture7.<br />
|-<br />
| 0x48<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x4C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Offset to the data for texture8.<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Offset to the data for texture9.<br />
|-<br />
| 0x5C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Offset to a 0x9-byte block.<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Must be <3. 1 = enables usage of the following field.<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x80<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x84<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x88<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x8C<br />
| 0x4<br />
| Offset to a 0x9-byte block.<br />
|-<br />
| 0x90<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x94<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x98<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x9C<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0xA0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xA4<br />
| 0x4<br />
| Offset to a 0x15-byte block.<br />
|-<br />
| 0xA8<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xAC<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0xB0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xB4<br />
| 0x4<br />
| Offset to a 0x6-byte block.<br />
|-<br />
| 0xB8<br />
| 0x4<br />
| Must be <2. 1 = below audio data section is used, otherwise it's not used.<br />
|-<br />
| 0xBC<br />
| 0x4<br />
| Audio data section size, this must be <=0x2DC00.<br />
|-<br />
| 0xC0<br />
| 0x4<br />
| Offset for the audio data section.<br />
|}<br />
<br />
The filesize is aligned to 0x10-bytes. The filesize must be at least 0xC4-bytes, due to padding/alignment the first block of data after the header is normally located at 0xD0.<br />
<br />
With the solid-color data, there's 5-bytes located at the solid-color data offset. With draw-type val2, there's 7-bytes located here. The first 4-bytes located here is RGBA8888 pixel data, the rest is unknown.<br />
<br />
With draw-type val2, texture5 is also used(this likely isn't used for the entire top-screen). With draw-type val2, an extra texture with the same format/dimensions as texture5 can be used, when the additional texture offset field is set.<br />
<br />
==Frame Types==<br />
{| class="wikitable" border="1"<br />
|-<br />
! FrameType<br />
| Description<br />
|-<br />
| 2<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2<br />
|-<br />
| 4<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2 > 1<br />
|}<br />
<br />
==Textures==<br />
{| class="wikitable" border="1"<br />
|-<br />
! ID<br />
! Color format<br />
! Texture display dimensions<br />
! Texture data dimensions<br />
! Description<br />
|-<br />
| 0<br />
| Tiled RGB565<br />
| 412x240<br />
| 512x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 1<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 2<br />
| Tiled RGB565<br />
| 320x240<br />
| 512x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 3<br />
| Tiled RGB565<br />
| 960x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 4<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 5<br />
| Tiled A8<br />
| 64x64<br />
| 64x64<br />
| This is used with the top-screen when top-screen draw-type is val2, see above.<br />
|-<br />
| 6<br />
| Tiled BGR888<br />
| 74x64<br />
| 128x64<br />
| This is used for folder's on the main menu.<br />
|-<br />
| 7<br />
| Tiled BGR888<br />
| 82x64<br />
| 128x64<br />
| This is used for open folder's on the main menu.<br />
|-<br />
| 8<br />
| Tiled BGR888<br />
| 36x72<br />
| 64x128<br />
| This is used for 48x48 icon borders on the main menu.<br />
|-<br />
| 9<br />
| Tiled BGR888<br />
| 25x50<br />
| 32x64<br />
| This is used for 24x24 icon borders on the main menu.<br />
|}<br />
<br />
==Audio data section==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x8<br />
| <br />
| Beginning of the audio data entries.<br />
|}<br />
<br />
The audio data section contains the sound effects for this theme.<br />
<br />
Audio data entry structure:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| Y (see below)<br />
| Additional data for CWAV 6, see below.<br />
|-<br />
| Y + 0x0<br />
| 0x4<br />
| CWAV size.<br />
|-<br />
| Y + 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| Y + 0x8<br />
| X (see below)<br />
| Additional data for CWAV 4, see below.<br />
|-<br />
| Y + 0x8 + X<br />
| <br />
| [[BCWAV|CWAV]]<br />
|}<br />
<br />
<br />
Structure of the data starting at offset 0x0, from the above entry, for the additional data with CWAV 7:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| ?<br />
|}<br />
<br />
Y / the size of this block, is 0x10-bytes.<br />
<br />
Structure of the data starting at offset 0x8, from the above entry, for the additional data with CWAV 4:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x2C<br />
| ?<br />
|}<br />
<br />
X / the size of this block, is 0x2C-bytes.<br />
<br />
It's unknown how exactly the number of CWAVs is controlled. The CWAVs are used for the following:<br />
* 0: Cursor movement<br />
* 1: Application launch<br />
* 2: Certain buttons<br />
* 3: Cancel buttons<br />
* 4: When cursor would be moved off the screen, left/right<br />
* 5: When cursor is moved a screen-worth of icons across<br />
* 6: Folder buttons<br />
<br />
=Built-in themes=<br />
The built-in themes are stored at Home Menu RomFS:/theme/<Color>_LZ.bin, the format appears to be the same as body_LZ.bin in the theme DLC content.</div>Reihttps://www.3dbrew.org/w/index.php?title=Home_Menu/Themes&diff=11360Home Menu/Themes2015-01-04T05:38:37Z<p>Rei: /* Decompressed body_LZ.bin structure */</p>
<hr />
<div>This page describes the formats/structure of the data stored in RomFS for [[Home Menu]] DLC, for themes.<br />
<br />
=Control Content=<br />
The control content has content-index 0. It's unknown what if any of this is Home Menu specific.<br />
<br />
RomFS structure:<br />
* "MetaDataContentHeader.bin": Unknown, size is 0x44-bytes.<br />
* "ContentInfoArchive_<region>_<lang>.bin" Contains the list of ''all'' DLC content available under this DLC title(which can include DLC that's not yet accessible via the shop). <region> can be "USA", etc. <lang>, for the US title: "en", "es", "fr", and "pt".<br />
* "icons/<decimal_id>.icn" Contains the raw DLC icon image data, without any header. 48x48 tiled RGB565.<br />
<br />
ContentInfoArchive entry format, size 0xC8(this file contains the following entry for each of the DLC content):<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Content index - 1<br />
|-<br />
| 0x4<br />
| 0x4<br />
| 0x0 = disabled, 0x1 = enabled.<br />
|-<br />
| 0x8<br />
| 0x40<br />
| char string for the title text.<br />
|-<br />
| 0x48<br />
| 0x88<br />
| char string for the description text.<br />
|}<br />
<br />
The first entry is a "header": contentindex val=1, second word = <total DLC content excluding DLC control content>. The two strings are set to dummy text.<br />
<br />
=Theme Content=<br />
RomFS structure:<br />
* "bgm.bcstm": Background music, see [[CSTRM|here]].<br />
* "body_LZ.bin": LZ11 compressed blob containing the rest of the theme data(graphics + optional [[BCWAV|CWAVs]]).<br />
<br />
=Decompressed body_LZ.bin structure=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Version (Must be 1)<br />
|-<br />
| 0x4<br />
| 0x1<br />
| Unknown<br />
|-<br />
| 0x5<br />
| 0x1<br />
| 0 = disable usage of bgm.bcstm, non-zero = enable usage of bgm.bcstm.<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Normally zero(not used?).<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Must be <4. Top screen draw type: 0 = none, 1 = solid color(see below), 2 = extension of val1(see below), 3 = texture.<br />
|-<br />
| 0x10<br />
| 0x4<br />
| Top screen frame type, when draw-type is 3: 0 = texture1, 1 = texture0, 3 = texture1.<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Offset for the top screen solid color data.<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Top screen texture offset, see below.<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Additional top-screen texture offset, used with draw-type val2. This is optional when using draw-type val2.<br />
|-<br />
| 0x20<br />
| 0x4<br />
| Must be <4. Bottom screen draw type: 0 = none, 1 = solid color(see below), 2 = invalid, 3 = texture.<br />
|-<br />
| 0x24<br />
| 0x4<br />
| Bottom screen frame type, when draw-type is 3: 0 = texture4, 1 = texture2, 2 = texture3, 3 = texture4, 4 = texture3.<br />
|-<br />
| 0x28<br />
| 0x4<br />
| Bottom Screen Solid Color/Texture offset, see below.<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x30<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x34<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x38<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0x3C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x40<br />
| 0x4<br />
| Offset to the data for texture6.<br />
|-<br />
| 0x44<br />
| 0x4<br />
| Offset to the data for texture7.<br />
|-<br />
| 0x48<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x4C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Offset to the data for texture8.<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Offset to the data for texture9.<br />
|-<br />
| 0x5C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Offset to a 0x9-byte block. (3 RGB colors for the GUI)<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following two fields.<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Must be <3. 1 = enables usage of the following field.<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x80<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x84<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x88<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x8C<br />
| 0x4<br />
| Offset to a 0x9-byte block.<br />
|-<br />
| 0x90<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x94<br />
| 0x4<br />
| Offset to a 0xD-byte block.<br />
|-<br />
| 0x98<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0x9C<br />
| 0x4<br />
| Offset to a 0x20-byte block.<br />
|-<br />
| 0xA0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xA4<br />
| 0x4<br />
| Offset to a 0x15-byte block.<br />
|-<br />
| 0xA8<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xAC<br />
| 0x4<br />
| Offset to a 0xC-byte block.<br />
|-<br />
| 0xB0<br />
| 0x4<br />
| Must be <2. 1 = enables usage of the following field.<br />
|-<br />
| 0xB4<br />
| 0x4<br />
| Offset to a 0x6-byte block.<br />
|-<br />
| 0xB8<br />
| 0x4<br />
| Must be <2. 1 = below audio data section is used, otherwise it's not used.<br />
|-<br />
| 0xBC<br />
| 0x4<br />
| Audio data section size, this must be <=0x2DC00.<br />
|-<br />
| 0xC0<br />
| 0x4<br />
| Offset for the audio data section.<br />
|}<br />
<br />
The filesize is aligned to 0x10-bytes. The filesize must be at least 0xC4-bytes, due to padding/alignment the first block of data after the header is normally located at 0xD0.<br />
<br />
With the solid-color data, there's 5-bytes located at the solid-color data offset. With draw-type val2, there's 7-bytes located here. The first 4-bytes located here is RGBA8888 pixel data, the rest is unknown.<br />
<br />
With draw-type val2, texture5 is also used(this likely isn't used for the entire top-screen). With draw-type val2, an extra texture with the same format/dimensions as texture5 can be used, when the additional texture offset field is set.<br />
<br />
==Frame Types==<br />
{| class="wikitable" border="1"<br />
|-<br />
! FrameType<br />
| Description<br />
|-<br />
| 2<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2<br />
|-<br />
| 4<br />
| Animated when pointer moved, split into 3 sections of 320*240 and displayed in the order 0 > 1 > 2 > 1<br />
|}<br />
<br />
==Textures==<br />
{| class="wikitable" border="1"<br />
|-<br />
! ID<br />
! Color format<br />
! Texture display dimensions<br />
! Texture data dimensions<br />
! Description<br />
|-<br />
| 0<br />
| Tiled RGB565<br />
| 412x240<br />
| 512x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 1<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the top-screen background, when the frame-type is set for this one.<br />
|-<br />
| 2<br />
| Tiled RGB565<br />
| 320x240<br />
| 512x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 3<br />
| Tiled RGB565<br />
| 960x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 4<br />
| Tiled RGB565<br />
| 1008x240<br />
| 1024x256<br />
| This is the texture used for the bottom-screen background, when the frame-type is set for this one.<br />
|-<br />
| 5<br />
| Tiled A8<br />
| 64x64<br />
| 64x64<br />
| This is used with the top-screen when top-screen draw-type is val2, see above.<br />
|-<br />
| 6<br />
| Tiled BGR888<br />
| 74x64<br />
| 128x64<br />
| This is used for folder's on the main menu.<br />
|-<br />
| 7<br />
| Tiled BGR888<br />
| 82x64<br />
| 128x64<br />
| This is used for open folder's on the main menu.<br />
|-<br />
| 8<br />
| Tiled BGR888<br />
| 36x72<br />
| 64x128<br />
| This is used for 48x48 icon borders on the main menu.<br />
|-<br />
| 9<br />
| Tiled BGR888<br />
| 25x50<br />
| 32x64<br />
| This is used for 24x24 icon borders on the main menu.<br />
|}<br />
<br />
==Audio data section==<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x8<br />
| <br />
| Beginning of the audio data entries.<br />
|}<br />
<br />
The audio data section contains the sound effects for this theme.<br />
<br />
Audio data entry structure:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| Y (see below)<br />
| Additional data for CWAV 6, see below.<br />
|-<br />
| Y + 0x0<br />
| 0x4<br />
| CWAV size.<br />
|-<br />
| Y + 0x4<br />
| 0x4<br />
| Unknown<br />
|-<br />
| Y + 0x8<br />
| X (see below)<br />
| Additional data for CWAV 4, see below.<br />
|-<br />
| Y + 0x8 + X<br />
| <br />
| [[BCWAV|CWAV]]<br />
|}<br />
<br />
<br />
Structure of the data starting at offset 0x0, from the above entry, for the additional data with CWAV 7:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| ?<br />
|}<br />
<br />
Y / the size of this block, is 0x10-bytes.<br />
<br />
Structure of the data starting at offset 0x8, from the above entry, for the additional data with CWAV 4:<br />
{| class="wikitable" border="1"<br />
|-<br />
! Relative offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x2C<br />
| ?<br />
|}<br />
<br />
X / the size of this block, is 0x2C-bytes.<br />
<br />
It's unknown how exactly the number of CWAVs is controlled. The CWAVs are used for the following:<br />
* 0: Cursor movement<br />
* 1: Application launch<br />
* 2: Certain buttons<br />
* 3: Cancel buttons<br />
* 4: When cursor would be moved off the screen, left/right<br />
* 5: When cursor is moved a screen-worth of icons across<br />
* 6: Folder buttons<br />
<br />
=Built-in themes=<br />
The built-in themes are stored at Home Menu RomFS:/theme/<Color>_LZ.bin, the format appears to be the same as body_LZ.bin in the theme DLC content.</div>Rei