APT:GetProgramInfo: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Steveice10 (talk | contribs)
 
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:
|-
|-
| 0
| 0
| Header code [0x00490180]
| Header code [0x00480100]
|-
|-
| 1-4
| 1-4
| 0x10-byte [[FS:GetProgramLaunchInfo|struct]] for the input title.
| [[Filesystem_services#ProgramInfo|Program Info]]
|}
|}


Line 25: Line 25:
|-
|-
| 2
| 2
| u8 flag: TWL = 0, CTR = (programIDhigh & 0xF00000) >> 20.
| u8, [[NCCH/Extended_Header#Flag0|System Mode]]
|-
|-
| 3
| 3
| Output programID-low.
| FIRM Program ID Low
|}
|}


=Description=
=Description=
This obtains info mainly used for [[APT:Reboot|launching]] [[FIRM]]. For TWL titles, the output programID-low is 0x102 for TWL_FIRM, however for CTR titles this is [[PMApp:GetTitleExheaderFlags|loaded]] from the first 4-bytes of the exheader_arm11systemlocalcaps.flags("Core Version").
This obtains info mainly used for [[APT:Reboot|launching]] [[FIRM]]. For TWL titles, the output Program ID Low is 0x102 for TWL_FIRM, however for CTR titles this is [[PMApp:GetTitleExheaderFlags|loaded]] from the first 4-bytes of the exheader_arm11systemlocalcaps.flags("Core Version"). For non-TWL titles when a certain NS state flag is set, the output flag is the value from config-mem [[Configuration_Memory|APPMEMTYPE]].

Latest revision as of 06:28, 24 July 2023

Request

Index Word Description
0 Header code [0x00480100]
1-4 Program Info

Response

Index Word Description
0 Header code
1 Result code
2 u8, System Mode
3 FIRM Program ID Low

Description

This obtains info mainly used for launching FIRM. For TWL titles, the output Program ID Low is 0x102 for TWL_FIRM, however for CTR titles this is loaded from the first 4-bytes of the exheader_arm11systemlocalcaps.flags("Core Version"). For non-TWL titles when a certain NS state flag is set, the output flag is the value from config-mem APPMEMTYPE.