Switch 2: GSV services: Difference between revisions
Created page with "= (S2) GraphicsSupervisor = This is a TIPC interface so the command numbers are subtracted by 16. {| class="wikitable" border="1" |- ! Cmd || Name |- | 1 || #InitializeGraphicsWithTransferMemory |- | 4 || #InitializeGraphics |- | 11 || #SetCurrentProcessHandle |- | 12 || |- | 101 || #StartGraphics |- | 111 || |- | 112 || |- | 114 || |- | 115 || |- | 187 || |- | 201 || |- | 301 || |- | 303 || |- | 311 || |- | 312 || |- | 314 || |- | 315 ||..." |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= (S2) | = (S2) UserSession = | ||
This is a TIPC interface so the command numbers are subtracted by 16. | This is a TIPC interface so the command numbers are subtracted by 16. | ||
| Line 16: | Line 16: | ||
| 101 || [[#StartGraphics]] | | 101 || [[#StartGraphics]] | ||
|- | |- | ||
| 111 || | | 111 || AllocateNativeMemory? | ||
|- | |- | ||
| 112 || | | 112 || DestroyNativeMemory | ||
|- | |- | ||
| | | 113 || CreateNativeMemoryByTransferMemory | ||
|- | |- | ||
| | | 114 || CreateNativeMemory | ||
|- | |- | ||
| | | 115 || (Gs) BootNativeMemoryManagement) | ||
|- | |- | ||
| | | 187 || (Gs) QueryNativeMemoryNvsNvRmMemIdForDebug | ||
|- | |- | ||
| | | 201 || (SyncPt) Initialize | ||
|- | |- | ||
| | | 202 || (SyncPt) InitializeA | ||
|- | |- | ||
| | | 211 || (SyncPt) CreateDebugSyncDevice | ||
|- | |- | ||
| | | 213 || (SyncPt) CreateDebugSyncCounter | ||
|- | |- | ||
| | | 214 || (SyncPt) DestroyDebugSyncCounter | ||
|- | |- | ||
| | | 215 || (SyncPt) ReportDebugSyncCounterValue | ||
|- | |- | ||
| 321 || | | 301 || (Vi2) Initialize | ||
|- | |||
| 303 || (Vi2) | |||
|- | |||
| 305 || (Vi2) | |||
|- | |||
| 311 || (Vi2) | |||
|- | |||
| 312 || (Vi2) | |||
|- | |||
| 314 || (Vi2) | |||
|- | |||
| 315 || (Vi2) | |||
|- | |||
| 321 || (Vi2) | |||
|- | |- | ||
| 327 || | | 327 || | ||
|- | |- | ||
| 391 || | | 391 || (Vi2) CalculateRequiredBufferMemory | ||
|- | |- | ||
| 401 || [[#PrepareGpuManagerSession]] | | 401 || [[#PrepareGpuManagerSession]] | ||
| Line 56: | Line 70: | ||
| 429 || [[#CreateNativeImage]] | | 429 || [[#CreateNativeImage]] | ||
|- | |- | ||
| 434 || | | 434 || (Gpu) BindAddressSpace? | ||
|- | |- | ||
| 435 || [[#CalculateNativeImageSize]] | | 435 || [[#CalculateNativeImageSize]] | ||
|- | |||
| 437 || CreateNativeMemoryWithGpukMemHandle | |||
|- | |- | ||
| 494 || | | 494 || | ||
| Line 66: | Line 82: | ||
| 497 || [[#CreateGpuManagerSession]] | | 497 || [[#CreateGpuManagerSession]] | ||
|- | |- | ||
| | | 498 || (Gpu) TryQueryDonatedTransferMemoryUsage | ||
|- | |||
| 601 || (Camera) Initialize | |||
|- | |||
| 602 || (Camera) InitializeA | |||
|- | |||
| 603 || (Camera) Finalize | |||
|- | |||
| 612 || (Camera) DestroyOutputBufferPool | |||
|- | |||
| 613 || (Camera) CreateAliasOutputBufferPool | |||
|- | |||
| 614 || (Camera) DestroyAliasOutputBufferPool | |||
|- | |||
| 615 || (Camera) CreateOutputBufferPool | |||
|- | |||
| 616 || (Camera) ReadFrameDataAsync | |||
|- | |||
| 620 || (Camera) InitializeB | |||
|- | |||
| 621 || (Camera) FinalizeB | |||
|- | |||
| 622 || (Camera) ListCameras | |||
|- | |||
| 623 || (Camera) OpenCamera | |||
|- | |||
| 624 || (Camera) CloseCamera | |||
|- | |||
| 626 || (Camera) ListSensorMode | |||
|- | |||
| 627 || (Camera) SetSensorMode | |||
|- | |||
| 628 || (Camera) GetAvailableStreams | |||
|- | |||
| 629 || (Camera) GetRequiredWorkBufferSize | |||
|- | |||
| 630 || (Camera) CreateStream | |||
|- | |||
| 632 || (Camera) GetReadDoneEvent | |||
|- | |||
| 633 || (Camera) GetStreamOutputSize | |||
|- | |||
| 634 || (Camera) DestroyStream | |||
|- | |||
| 636 || (Camera) ReadFrameDataAsync | |||
|- | |||
| 637 || (Camera) GetAttachedEvent | |||
|- | |||
| 638 || (Camera) GetDetachedEvent | |||
|- | |||
| 639 || (Camera) GetFrameInfo | |||
|- | |||
| 640 || (Camera) GetFrameInfo2 | |||
|- | |- | ||
| | | 641 || (Camera) GetConnectionChangedEvent | ||
|- | |- | ||
| 903 || | | 650 || (Camera) SetPictureQualityConfig | ||
|- | |||
| 651 || (Camera) GetPictureQualityConfig | |||
|- | |||
| 652 || (Camera) SetDigitalWindow | |||
|- | |||
| 653 || (Camera) GetDigitalWindow | |||
|- | |||
| 654 || (Camera) GetDigitalWindowCapability | |||
|- | |||
| 655 || (Camera) GetSupportedFunctions | |||
|- | |||
| 656 || (Camera) GetSupportedDebugFunctions | |||
|- | |||
| 657 || (Camera) GetCameraPrivacyCoverStatus | |||
|- | |||
| 658 || (Camera) GetCameraDeviceTemperature | |||
|- | |||
| 659 || (Camera) GetDeviceUniqueId | |||
|- | |||
| 660 || (Camera) GetSensorMode | |||
|- | |||
| 661 || (Camera) GetStride | |||
|- | |||
| 662 || (Camera) UnlinkSensor | |||
|- | |||
| 663 || (Camera) GetDeviceModel | |||
|- | |||
| 664 || (Camera) SetRawSensorMode | |||
|- | |||
| 665 || (Camera) GetAccessAllowed | |||
|- | |||
| 666 || (Camera) GetHostDrivenAeRegion | |||
|- | |||
| 667 || (Camera) SetHostDrivenAeRegion | |||
|- | |||
| 691 || (Camera) CalculateImageArraySize | |||
|- | |||
| 901 || (Codec Decoder) InitializeA | |||
|- | |||
| 902 || (Codec Decoder) InitializeB | |||
|- | |||
| 903 || (Codec Decoder) Finalize | |||
|- | |||
| 904 || (Codec Decoder) InitializeForSystem | |||
|- | |- | ||
| 905 || | | 905 || | ||
|- | |- | ||
| 911 || | | 911 || (Codec Decoder) InitializeDecoderImagePool? | ||
|- | |||
| 912 || (Codec Decoder) | |||
|- | |||
| 921 || (Codec Decoder) InitializeDecoderAliasImagePool? | |||
|- | |||
| 922 || (Codec Decoder) FinalizeEncoderImagePool? | |||
|- | |||
| 961 || (Codec Decoder) ReadDecoderOutput | |||
|- | |||
| 991 || (Codec Decoder) CalculateDecoderImagePoolBuffer | |||
|- | |||
| 1001 || (Codec Encoder) InitializeA | |||
|- | |||
| 1002 || (Codec Encoder) InitializeB | |||
|- | |||
| 1003 || (Codec Encoder) Finalize | |||
|- | |||
| 1004 || (Codec Encoder) InitializeForSystem | |||
|- | |||
| 1011 || (Codec Encoder) InitializeEncoderImagePool? | |||
|- | |- | ||
| | | 1012 || (Codec Encoder) | ||
|- | |- | ||
| | | 1021 || (Codec Encoder) InitializeEncoderAliasImagePool | ||
|- | |- | ||
| | | 1022 || (Codec Encoder) FinalizeEncoderImagePool | ||
|- | |- | ||
| | | 1061 || (Codec Encoder) WriteEncoderInput | ||
|- | |- | ||
| | | 1091 || (Codec Encoder) CalculateEncoderImagePoolBuffer | ||
|- | |- | ||
| | | 1101 || (Graphics Frame Management) Initialize | ||
|- | |- | ||
| | | 1102 || (Graphics Frame Management) InitializeA | ||
|- | |- | ||
| | | 1111 || (Graphics Frame Management) SetGraphicsFrameLengthMode | ||
|- | |- | ||
| | | 1112 || (Graphics Frame Management) SetGraphicsFrameRestartMode | ||
|- | |- | ||
| 1301 || [[#InitializeAdraw]] | | 1301 || [[#InitializeAdraw]] | ||
| Line 102: | Line 234: | ||
| 1326 || [[#GetAdrawImageHandle]] | | 1326 || [[#GetAdrawImageHandle]] | ||
|- | |- | ||
| 1401 || [[#CreateNvDrv2UserSessionWithTransferMemory]] | | 1401 || (Nnsrv) [[#CreateNvDrv2UserSessionWithTransferMemory]] | ||
|- | |- | ||
| 1402 || [[#CreateNvDrv2UserSession]] | | 1402 || (Nnsrv) [[#CreateNvDrv2UserSession]] | ||
|- | |- | ||
| 1411 || [[#GetNvDrv2UserTransferMemoryUsage]] | | 1411 || [[#GetNvDrv2UserTransferMemoryUsage]] | ||
Latest revision as of 06:18, 14 March 2026
(S2) UserSession
This is a TIPC interface so the command numbers are subtracted by 16.
| Cmd | Name |
|---|---|
| 1 | #InitializeGraphicsWithTransferMemory |
| 4 | #InitializeGraphics |
| 11 | #SetCurrentProcessHandle |
| 12 | |
| 101 | #StartGraphics |
| 111 | AllocateNativeMemory? |
| 112 | DestroyNativeMemory |
| 113 | CreateNativeMemoryByTransferMemory |
| 114 | CreateNativeMemory |
| 115 | (Gs) BootNativeMemoryManagement) |
| 187 | (Gs) QueryNativeMemoryNvsNvRmMemIdForDebug |
| 201 | (SyncPt) Initialize |
| 202 | (SyncPt) InitializeA |
| 211 | (SyncPt) CreateDebugSyncDevice |
| 213 | (SyncPt) CreateDebugSyncCounter |
| 214 | (SyncPt) DestroyDebugSyncCounter |
| 215 | (SyncPt) ReportDebugSyncCounterValue |
| 301 | (Vi2) Initialize |
| 303 | (Vi2) |
| 305 | (Vi2) |
| 311 | (Vi2) |
| 312 | (Vi2) |
| 314 | (Vi2) |
| 315 | (Vi2) |
| 321 | (Vi2) |
| 327 | |
| 391 | (Vi2) CalculateRequiredBufferMemory |
| 401 | #PrepareGpuManagerSession |
| 402 | #StartGpuManagerSession |
| 423 | |
| 428 | #QueryNativeImage |
| 429 | #CreateNativeImage |
| 434 | (Gpu) BindAddressSpace? |
| 435 | #CalculateNativeImageSize |
| 437 | CreateNativeMemoryWithGpukMemHandle |
| 494 | |
| 496 | #CreateGpuManagerSessionWithTransferMemory |
| 497 | #CreateGpuManagerSession |
| 498 | (Gpu) TryQueryDonatedTransferMemoryUsage |
| 601 | (Camera) Initialize |
| 602 | (Camera) InitializeA |
| 603 | (Camera) Finalize |
| 612 | (Camera) DestroyOutputBufferPool |
| 613 | (Camera) CreateAliasOutputBufferPool |
| 614 | (Camera) DestroyAliasOutputBufferPool |
| 615 | (Camera) CreateOutputBufferPool |
| 616 | (Camera) ReadFrameDataAsync |
| 620 | (Camera) InitializeB |
| 621 | (Camera) FinalizeB |
| 622 | (Camera) ListCameras |
| 623 | (Camera) OpenCamera |
| 624 | (Camera) CloseCamera |
| 626 | (Camera) ListSensorMode |
| 627 | (Camera) SetSensorMode |
| 628 | (Camera) GetAvailableStreams |
| 629 | (Camera) GetRequiredWorkBufferSize |
| 630 | (Camera) CreateStream |
| 632 | (Camera) GetReadDoneEvent |
| 633 | (Camera) GetStreamOutputSize |
| 634 | (Camera) DestroyStream |
| 636 | (Camera) ReadFrameDataAsync |
| 637 | (Camera) GetAttachedEvent |
| 638 | (Camera) GetDetachedEvent |
| 639 | (Camera) GetFrameInfo |
| 640 | (Camera) GetFrameInfo2 |
| 641 | (Camera) GetConnectionChangedEvent |
| 650 | (Camera) SetPictureQualityConfig |
| 651 | (Camera) GetPictureQualityConfig |
| 652 | (Camera) SetDigitalWindow |
| 653 | (Camera) GetDigitalWindow |
| 654 | (Camera) GetDigitalWindowCapability |
| 655 | (Camera) GetSupportedFunctions |
| 656 | (Camera) GetSupportedDebugFunctions |
| 657 | (Camera) GetCameraPrivacyCoverStatus |
| 658 | (Camera) GetCameraDeviceTemperature |
| 659 | (Camera) GetDeviceUniqueId |
| 660 | (Camera) GetSensorMode |
| 661 | (Camera) GetStride |
| 662 | (Camera) UnlinkSensor |
| 663 | (Camera) GetDeviceModel |
| 664 | (Camera) SetRawSensorMode |
| 665 | (Camera) GetAccessAllowed |
| 666 | (Camera) GetHostDrivenAeRegion |
| 667 | (Camera) SetHostDrivenAeRegion |
| 691 | (Camera) CalculateImageArraySize |
| 901 | (Codec Decoder) InitializeA |
| 902 | (Codec Decoder) InitializeB |
| 903 | (Codec Decoder) Finalize |
| 904 | (Codec Decoder) InitializeForSystem |
| 905 | |
| 911 | (Codec Decoder) InitializeDecoderImagePool? |
| 912 | (Codec Decoder) |
| 921 | (Codec Decoder) InitializeDecoderAliasImagePool? |
| 922 | (Codec Decoder) FinalizeEncoderImagePool? |
| 961 | (Codec Decoder) ReadDecoderOutput |
| 991 | (Codec Decoder) CalculateDecoderImagePoolBuffer |
| 1001 | (Codec Encoder) InitializeA |
| 1002 | (Codec Encoder) InitializeB |
| 1003 | (Codec Encoder) Finalize |
| 1004 | (Codec Encoder) InitializeForSystem |
| 1011 | (Codec Encoder) InitializeEncoderImagePool? |
| 1012 | (Codec Encoder) |
| 1021 | (Codec Encoder) InitializeEncoderAliasImagePool |
| 1022 | (Codec Encoder) FinalizeEncoderImagePool |
| 1061 | (Codec Encoder) WriteEncoderInput |
| 1091 | (Codec Encoder) CalculateEncoderImagePoolBuffer |
| 1101 | (Graphics Frame Management) Initialize |
| 1102 | (Graphics Frame Management) InitializeA |
| 1111 | (Graphics Frame Management) SetGraphicsFrameLengthMode |
| 1112 | (Graphics Frame Management) SetGraphicsFrameRestartMode |
| 1301 | #InitializeAdraw |
| 1302 | #StartAdraw |
| 1325 | #GetAdrawFrameBufferHandle |
| 1326 | #GetAdrawImageHandle |
| 1401 | (Nnsrv) #CreateNvDrv2UserSessionWithTransferMemory |
| 1402 | (Nnsrv) #CreateNvDrv2UserSession |
| 1411 | #GetNvDrv2UserTransferMemoryUsage |
| 1501 | |
| 1502 | |
| 1601 | |
| 1602 | |
| 1603 | |
| 1611 | |
| 1612 | |
| 1691 |
InitializeGraphicsWithTransferMemory
Unofficial name.
Takes a TransferMemory handle, an input AppletResourceUserId and an input u64 TransferMemorySize. No output.
InitializeGraphics
Unofficial name.
Takes a Process handle, an input AppletResourceUserId and five input u64s. No output.
The first u64 appears to be a version ([19.0.0] 0x8000000000000001, [20.1.1] 0x8000000000000005), the last u64 is the output from new InfoType 31 or 32 and the remaining u64s are all 0.
SetCurrentProcessHandle
Unofficial name.
Takes a Process handle. No output.
Called directly after #InitializeGraphicsWithTransferMemory or #InitializeGraphics.
StartGraphics
Unofficial name.
No input/output.
Called directly after #SetCurrentProcessHandle.
PrepareGpuManagerSession
Unofficial name.
No input/output.
Called directly after #CreateGpuManagerSessionWithTransferMemory or #CreateGpuManagerSession.
StartGpuManagerSession
Unofficial name.
No input/output.
Called directly after #PrepareGpuManagerSession.
GetImageInfo
Unofficial name.
Takes an input u32 ImageHandle. Returns an ImageInfo.
CreateGpuManagerSessionWithTransferMemory
Unofficial name.
Takes a TransferMemory handle and two input u64s Version and TransferMemorySize. Returns a #GpuManagerSession.
[19.0.0] Version must be 2.
CreateGpuManagerSession
Unofficial name.
Takes an input u64 Version. Returns a #GpuManagerSession.
[19.0.0] Version must be 2.
InitializeAdraw
Unofficial name.
No input/output.
StartAdraw
Unofficial name.
No input/output.
Called directly after #InitializeAdraw.
GetAdrawFrameBufferHandle
Unofficial name.
Takes an input u64. Returns an output u32 FrameBufferHandle.
Official software sends the Id obtained with GetFrameBufferInfo from adraw.
GetAdrawImageHandle
Unofficial name.
Takes seven input u64s, two input u16s and two input u32s. Returns an output u32 ImageHandle.
Official software sends 0x100000000 in the first u64, 0 in all remaining u64s, Width and Height in the two u16s, BlockCount int the first u32 and the FrameBufferHandle from GetAdrawFrameBufferHandle in the last u32.
CreateNvDrv2UserSessionWithTransferMemory
Unofficial name.
Takes a TransferMemory handle, an input u64 TransferMemorySize and an input u8. Returns an INvDrv2User.
CreateNvDrv2UserSession
Unofficial name.
No input. Returns an INvDrv2User.
Only one session can be open at a time, otherwise returns error 0x200f3.
GetNvDrv2UserTransferMemoryUsage
Unofficial name.
No input. Returns three u64s TotalTransferMemorySize, UsedTransferMemorySize and MaxTransferMemorySize.
GpuManagerSession
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
| Cmd | Name |
|---|---|
| 11 | #GetEventIdRange |
| 12 | #CreateEvent |
| 21 | #RequestGpuSession |
| 22 | #GetGpuSession |
| 33 | |
| 41 | |
| 42 | |
| 102 | |
| 200 | |
| 201 | |
| 202 |
GetEventIdRange
Unofficial name.
No input. Returns two u32s EventIdMin and EventIdMax.
CreateEvent
Unofficial name.
Takes an input u32 EventId. Returns an output Event handle.
RequestGpuSession
Unofficial name.
Takes an input u32 EventId. No output.
EventId must have been previously passed to #CreateEvent and the returned Event handle will be signalled when the session is ready.
GetGpuSession
Unofficial name.
No input. Returns a #GpuSession.
Called after #RequestGpuSession and the Event handle has been signalled.
GpuSession
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
| Cmd | Name |
|---|---|
| 101 | #CreateGpuMemory |
| 102 | #DestroyGpuMemory |
| 201 | [19.0.0-19.1.0] MapMemory |
| 202 | [19.0.0-19.1.0] UnmapMemory |
| 203 | [19.0.0-19.1.0] AllocateAddressSpace |
| 204 | [19.0.0-19.1.0] FreeAddressSpace |
| 205 | [19.0.0-19.1.0] RemapMemory |
| 207 | [19.0.0-19.1.0] ModifyMemoryMapping |
| 211 | [20.1.1+] MapMemoryV2 |
| 212 | [20.1.1+] ModifyMemoryMappingV2 |
| 213 | [20.1.1+] UnmapMemoryV2 |
| 214 | [20.1.1+] AllocateAddressSpaceV2 |
| 215 | [20.1.1+] FreeAddressSpaceV2 |
| 216 | [20.1.1+] RemapMemoryV2 |
CreateGpuMemory
Unofficial name.
Takes two input u64s MemoryAddressStart and MemoryAddressEnd and two u8s. Returns an output u32 GpuMemoryHandle.
The memory region between MemoryAddressStart and MemoryAddressEnd must have been passed to SVC 0x80 with attribute 0x20.
DestroyGpuMemory
Unofficial name.
Takes two input u32s GpuMemoryHandle and EventId. No output.
The Event handle associated with EventId will be signalled when the memory is released.