APT:GetProgramInfo: Difference between revisions

From 3dbrew
Jump to navigation Jump to search
Steveice10 (talk | contribs)
m Update link.
Steveice10 (talk | contribs)
m Link to FS common program info.
Line 9: Line 9:
|-
|-
| 1-4
| 1-4
| [[FSReg:LoadProgram#ProgramInfo|ProgramInfo struct]] for the input title.
| [[Filesystem_services#ProgramInfo|Program Info]] for the input title.
|}
|}



Revision as of 23:52, 17 October 2015

Request

Index Word Description
0 Header code [0x00480100]
1-4 Program Info for the input title.

Response

Index Word Description
0 Header code
1 Result code
2 u8 flag: TWL = 1, CTR = ((flags[7] & 0xF0) >> 4). ("System mode" from exheader flags)
3 Output programID-low.

Description

This obtains info mainly used for launching FIRM. For TWL titles, the output programID-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.