Add fsDeviceOperator* types for IDeviceOperator#730
Conversation
ed4110a to
efbc80a
Compare
|
(intended use currently WIP borntohonk/Atmosphere@0f36778 but related to topic from closed PR linked above) |
|
The scope of what has to be implemented on atmosphere end is the entirity of the IDeviceOperator interface, so the scope has changed a tiny bit |
|
This requires implementing some still undocumented entries within https://switchbrew.org/wiki/Filesystem_services#IDeviceOperator; those ones I am not entirely 100% sure on, but i am checking them with ghidra to cmd 7; SetSdCardActivationMode |
I've added the missing commands to switchbrew. |
upon testing, the current way i have implemented fsDeviceOperatorRegisterGameCardConfigurationData results in (nn::ns::detail::IApplicationManagerInterface:Cmd502, RequestCheckGameCardRegistration ) to crash. (or similar, i am just working with the coincidence of words clashing and whats new as to identify the cause, and since that one is one of the new ones, i'm guessing it has to be that one) so i am going to look over again with the updated information, as I most likely am mishandling RegisterGameCardConfigurationData (or something else) |
364e4f6 to
7fd9a4e
Compare
|
Should be where it is supposed to be at, minus corrections for struct helpers, if necessary, comments, if necessary, and so on (* aside from some consistency for declaring u8) i noticed some stray / inconsistent stuff while combing over, and noticed, example the wrong cmd was defined as 1007 which is supposed to be RegisterUpdatePartition |
a411980 to
2e37cab
Compare
|
tiny adjustment to be able to call for them on atmosphere side as just |
|
i was having issues implementing this properly into atmosphere, so i ended up overhauling ghidra-switch-loader to assist me in correcting what I was doing wrong. (the game cartridge slot ceases to function, which is a problem) edit: i ended up finding a 20.0.0 version cartridge and examining all the IDeviceOperator calls from the sdk nso0 from that. example: iVar1 = (**(code **)(_Reset + 0x240))(0,&local_658); iVar1 = (**(code **)(*local_48 + 0x178))(local_48,&local_658,0x600,param_2) deduction: i corrected the ipc emulator within ghidra-switch-loader to be able to output this: (examples from FS exfat binary 20.0.0) compared to the ninupdates reports; part of this quest, also led to enhancing this now newfound identified information within the ipc analyzing/emulation, to mark the buffers positions in the pseudocode of the functions, which are all labeled now. which led to this result, allowing me to discern, me implementing the wrong order might have been causing problems: edit: exported prototypes from the 20.0.0 cartridge sdk nso0 (this improvement to ghidra-switch-loader should also be applicable to all the other interfaces FS has, not just IDeviceOperator) |
helper for cleaner implementation of Atmosphere-NX/Atmosphere#2804 (and to allow the implementation to be more consistent with how other atmosphere IDeviceOperator related things are implemented.)
https://switchbrew.org/wiki/NS_services#GetGameCardPlatformRegion
https://switchbrew.org/wiki/Filesystem_services#GetGameCardHandle
https://switchbrew.org/wiki/Filesystem_services#IDeviceOperator