2016-11-17 20:36:25 +01:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2016
|
|
|
|
* by Dimok
|
|
|
|
*
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
* warranty. In no event will the authors be held liable for any
|
|
|
|
* damages arising from the use of this software.
|
|
|
|
*
|
|
|
|
* Permission is granted to anyone to use this software for any
|
|
|
|
* purpose, including commercial applications, and to alter it and
|
|
|
|
* redistribute it freely, subject to the following restrictions:
|
|
|
|
*
|
|
|
|
* 1. The origin of this software must not be misrepresented; you
|
|
|
|
* must not claim that you wrote the original software. If you use
|
|
|
|
* this software in a product, an acknowledgment in the product
|
|
|
|
* documentation would be appreciated but is not required.
|
|
|
|
*
|
|
|
|
* 2. Altered source versions must be plainly marked as such, and
|
|
|
|
* must not be misrepresented as being the original software.
|
|
|
|
*
|
|
|
|
* 3. This notice may not be removed or altered from any source
|
|
|
|
* distribution.
|
|
|
|
***************************************************************************/
|
2021-09-24 19:38:34 +02:00
|
|
|
#pragma once
|
2016-11-17 20:36:25 +01:00
|
|
|
|
2022-03-30 02:37:45 +02:00
|
|
|
#include <coreinit/filesystem.h>
|
2016-11-18 11:26:29 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2016-11-17 20:36:25 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-03-30 02:37:45 +02:00
|
|
|
// Deprecated: Use FS_STAT_DIRECTORY
|
|
|
|
#ifndef DIR_ENTRY_IS_DIRECTORY
|
|
|
|
#define DIR_ENTRY_IS_DIRECTORY FS_STAT_FILE
|
|
|
|
#endif
|
2016-11-17 20:36:25 +01:00
|
|
|
|
|
|
|
#define FSA_MOUNTFLAGS_BINDMOUNT (1 << 0)
|
2022-02-03 13:09:27 +01:00
|
|
|
#define FSA_MOUNTFLAGS_GLOBAL (1 << 1)
|
2016-11-17 20:36:25 +01:00
|
|
|
|
2022-05-18 17:15:43 +02:00
|
|
|
int IOSUHAX_UnlockFSClient(FSClient *client);
|
|
|
|
|
2022-06-03 16:41:07 +02:00
|
|
|
int IOSUHAX_FSAMount(FSClient *client, const char *source, const char *target);
|
|
|
|
int IOSUHAX_FSAMountEx(int clientHandle, const char *source, const char *target);
|
|
|
|
|
|
|
|
int IOSUHAX_FSAUnmount(FSClient *client, const char *mountedTarget);
|
|
|
|
int IOSUHAX_FSAUnmountEx(int clientHandle, const char *mountedTarget);
|
|
|
|
|
|
|
|
int IOSUHAX_FSARawOpen(FSClient *client, char *device_path, int32_t *outHandle);
|
|
|
|
int IOSUHAX_FSARawOpenEx(int clientHandle, char *device_path, int32_t *outHandle);
|
|
|
|
|
|
|
|
int IOSUHAX_FSARawRead(FSClient *client, void *data, uint32_t size_bytes, uint32_t cnt, uint64_t blocks_offset, int device_handle);
|
|
|
|
int IOSUHAX_FSARawReadEx(int clientHandle, void *data, uint32_t size_bytes, uint32_t cnt, uint64_t blocks_offset, int device_handle);
|
|
|
|
|
|
|
|
int IOSUHAX_FSARawWrite(FSClient *client, const void *data, uint32_t size_bytes, uint32_t cnt, uint64_t blocks_offset, int device_handle);
|
|
|
|
int IOSUHAX_FSARawWriteEx(int clientHandle, const void *data, uint32_t size_bytes, uint32_t cnt, uint64_t blocks_offset, int device_handle);
|
|
|
|
|
|
|
|
int IOSUHAX_FSARawClose(FSClient *client, int32_t device_handle);
|
|
|
|
int IOSUHAX_FSARawCloseEx(int clientHandle, int32_t device_handle);
|
2022-05-18 17:15:43 +02:00
|
|
|
|
2022-02-03 13:09:27 +01:00
|
|
|
int IOSUHAX_Open(const char *dev); // if dev == NULL the default path /dev/iosuhax will be used
|
2016-11-17 20:36:25 +01:00
|
|
|
int IOSUHAX_Close(void);
|
|
|
|
|
2021-09-24 19:38:34 +02:00
|
|
|
int IOSUHAX_memwrite(uint32_t address, const uint8_t *buffer, uint32_t size); // IOSU external input
|
|
|
|
int IOSUHAX_memread(uint32_t address, uint8_t *out_buffer, uint32_t size); // IOSU external output
|
2022-02-03 13:09:27 +01:00
|
|
|
int IOSUHAX_memcpy(uint32_t dst, uint32_t src, uint32_t size); // IOSU internal memcpy only
|
2016-11-17 20:36:25 +01:00
|
|
|
|
2021-04-05 00:20:27 +02:00
|
|
|
int IOSUHAX_kern_write32(uint32_t address, uint32_t value);
|
|
|
|
|
2021-09-24 19:38:34 +02:00
|
|
|
int IOSUHAX_kern_read32(uint32_t address, uint32_t *out_buffer, uint32_t count);
|
|
|
|
|
2022-02-03 13:09:27 +01:00
|
|
|
int IOSUHAX_read_otp(uint8_t *out_buffer, uint32_t size);
|
2021-10-09 00:54:48 +02:00
|
|
|
|
2022-02-03 13:09:27 +01:00
|
|
|
int IOSUHAX_read_seeprom(uint8_t *out_buffer, uint32_t offset, uint32_t size);
|
2022-01-29 18:42:45 +01:00
|
|
|
|
2022-02-03 13:09:27 +01:00
|
|
|
int IOSUHAX_ODM_GetDiscKey(uint8_t *discKey);
|
2021-10-09 00:54:48 +02:00
|
|
|
|
2021-09-24 19:38:34 +02:00
|
|
|
int IOSUHAX_SVC(uint32_t svc_id, uint32_t *args, uint32_t arg_cnt);
|
2016-11-17 20:36:25 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2021-09-24 19:38:34 +02:00
|
|
|
#endif
|