RO Services: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				m Add anchors  | 
				||
| (20 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{Anchor|RO}}{{Anchor|ldr:ro}}  | |||
= RO service "ldr:ro" =  | = RO service "ldr:ro" =  | ||
{| class="wikitable" border="1"  | {| class="wikitable" border="1"  | ||
|-  | |-  | ||
!  Command Header  | !  Command Header  | ||
!  Available since system version  | |||
!  Description  | !  Description  | ||
|-  | |-  | ||
| 0x000100C2  | | 0x000100C2  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:Initialize|Initialize]]  | |||
|-  | |-  | ||
| 0x00020082  | | 0x00020082  | ||
| LoadCRR  | | [[2.0.0-2]]  | ||
| [[RO:LoadCRR|LoadCRR]]  | |||
|-  | |-  | ||
| 0x00030042  | | 0x00030042  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:UnloadCRR|UnloadCRR]]  | |||
|-  | |-  | ||
| 0x000402C2  | | 0x000402C2  | ||
|   | | [[2.0.0-2]]  | ||
| [[RO:LoadExeCRO|LoadCRO]]  | |||
|-  | |-  | ||
| 0x000500C2  | | 0x000500C2  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:UnloadCRO|UnloadCRO]]  | |||
|-  | |-  | ||
| 0x00060042  | | 0x00060042  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:LinkCRO|LinkCRO]]  | |||
|-  | |-  | ||
| 0x00070042  | | 0x00070042  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:UnlinkCRO|UnlinkCRO]]  | |||
|-  | |-  | ||
| 0x00080042  | | 0x00080042  | ||
|    | | [[2.0.0-2]]  | ||
| [[RO:Shutdown|Shutdown]]  | |||
|-  | |||
| 0x000902C2  | |||
| [[7.2.0-17]]  | |||
| [[RO:LoadExeCRO|LoadCRO_New]]  | |||
|}  | |||
The mapadress used in these services is calculated by the user-process like so: when inputaddr is <0x08000000, the address used is the same one from inputaddr. Otherwise, the address is: mapvaddr = inputaddr - (0x08000000 - <main-process .text address + .text, .rodata, .data, and .bss size aligned to pagesize>). This service API is used for CTR "DLLs"/shared libraries: [[CRO0|CRO]].  | |||
= Error Codes =  | |||
{| class="wikitable" border ="1"  | |||
|-  | |||
!Error Code  | |||
!Description  | |||
|-  | |||
| D9012FF1  | |||
| Address is misaligned  | |||
|-  | |||
| E0A12FF9  | |||
| Service is already Initialized  | |||
|-  | |||
| E1612FF7  | |||
| Provided Kernel Handle is invalid  | |||
|-  | |||
|}  | |||
= Version history =  | |||
{| class="wikitable" border="1"  | |||
|-  | |||
!  Version  | |||
!  Changes  | |||
|-  | |||
| v0  | |||
| Initial version.  | |||
|-  | |||
| v1024  | |||
| Removed access for SVC's: 5,7,D,E,10.  | |||
Cmd5 now sets the last segment in the CRO binary to R-X when it's done.  | |||
Maybe more.  | |||
|-  | |||
| v2049  | |||
| No changes.  | |||
|-  | |||
| v3074  | |||
| Added cmd9.  | |||
|-  | |||
| v4096  | |||
| No changes.  | |||
|-  | |||
| [[9.0.0-20|v5120]]  | |||
| No actual changes, just a rebuild with latest CTRSDK(only the CTRSDK version values in .code for [[ErrDisp]] were updated).  | |||
|}  | |}  | ||
[[Category:Services]]  | |||
Latest revision as of 12:35, 18 September 2024
RO service "ldr:ro"
| Command Header | Available since system version | Description | 
|---|---|---|
| 0x000100C2 | 2.0.0-2 | Initialize | 
| 0x00020082 | 2.0.0-2 | LoadCRR | 
| 0x00030042 | 2.0.0-2 | UnloadCRR | 
| 0x000402C2 | 2.0.0-2 | LoadCRO | 
| 0x000500C2 | 2.0.0-2 | UnloadCRO | 
| 0x00060042 | 2.0.0-2 | LinkCRO | 
| 0x00070042 | 2.0.0-2 | UnlinkCRO | 
| 0x00080042 | 2.0.0-2 | Shutdown | 
| 0x000902C2 | 7.2.0-17 | LoadCRO_New | 
The mapadress used in these services is calculated by the user-process like so: when inputaddr is <0x08000000, the address used is the same one from inputaddr. Otherwise, the address is: mapvaddr = inputaddr - (0x08000000 - <main-process .text address + .text, .rodata, .data, and .bss size aligned to pagesize>). This service API is used for CTR "DLLs"/shared libraries: CRO.
Error Codes
| Error Code | Description | 
|---|---|
| D9012FF1 | Address is misaligned | 
| E0A12FF9 | Service is already Initialized | 
| E1612FF7 | Provided Kernel Handle is invalid | 
Version history
| Version | Changes | 
|---|---|
| v0 | Initial version. | 
| v1024 | Removed access for SVC's: 5,7,D,E,10.
 Cmd5 now sets the last segment in the CRO binary to R-X when it's done. Maybe more.  | 
| v2049 | No changes. | 
| v3074 | Added cmd9. | 
| v4096 | No changes. | 
| v5120 | No actual changes, just a rebuild with latest CTRSDK(only the CTRSDK version values in .code for ErrDisp were updated). |