added kernel libraries bindings and cleaned up todos

This commit is contained in:
2024-05-12 16:16:15 +02:00
parent e9824cbd95
commit 8a5e2870f6
68 changed files with 3278 additions and 92 deletions
+74
View File
@@ -1,8 +1,10 @@
package registrymgr
import "core:c"
import sce "../common"
foreign import registrymgr "system:SceRegistryMgr_stub"
foreign import registrymgrkern "system:SceRegMgrForDriver_stub"
@(link_prefix = "sceRegMgr")
foreign registrymgr {
@@ -141,3 +143,75 @@ foreign registrymgr {
*/
GetRegVersion :: proc(version: c.int, buf: [^]c.char) -> c.int ---
}
foreign registrymgrkern {
/**
* Get a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to a buffer to hold the value
* @param size - The size of the buffer
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrGetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: sce.Size) -> c.int ---
/**
* Get a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to a int buffer to hold the value
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrGetKeyInt :: proc(category: cstring, name: cstring, buf: ^c.int) -> c.int ---
/**
* Get a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to a char buffer to hold the value
* @param size - The size of the buffer
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrGetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: sce.Size) -> c.int ---
/**
* Set a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to a buffer to hold the value
* @param size - The size of the buffer
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrSetKeyBin :: proc(category: cstring, name: cstring, buf: rawptr, size: sce.Size) -> c.int ---
/**
* Set a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to an int buffer to hold the value
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrSetKeyInt :: proc(category: cstring, name: cstring, buf: c.int) -> c.int ---
/**
* Set a key's information by category and name
*
* @param category - The path to the directory to be opened (e.g. /CONFIG/SYSTEM)
* @param name - Name of the key
* @param buf - Pointer to a char buffer to hold the value
* @param size - The size of the buffer
*
* @return 0 on success, < 0 on error
*/
ksceRegMgrSetKeyStr :: proc(category: cstring, name: cstring, buf: [^]c.char, size: sce.Size) -> c.int ---
}