wiiu-nanddumper-payload/ios_fs/source/imports.h

47 lines
2.6 KiB
C
Raw Normal View History

2016-12-12 19:31:02 +01:00
#ifndef IMPORTS_H_
#define IMPORTS_H_
2017-03-25 22:05:37 +01:00
#include "types.h"
2016-12-12 19:31:02 +01:00
#define FS_IOS_SHUTDOWN ((void (*)(int))0x107F6C94)
#define FS_SVC_CREATEMUTEX ((int (*)(int, int))0x107F6BBC)
#define FS_SVC_ACQUIREMUTEX ((int (*)(int, int))0x107F6BC4)
#define FS_SVC_RELEASEMUTEX ((int (*)(int))0x107F6BCC)
#define FS_SVC_DESTROYMUTEX ((int (*)(int))0x107F6BD4)
#define FS_SLEEP ((void (*)(int))0x1071D668)
2017-03-25 22:05:37 +01:00
#define FS_MEMCMP ((int (*)(const void*, const void*, u32))0x107F4E94)
2016-12-12 19:31:02 +01:00
#define FS_MEMCPY ((void* (*)(void*, const void*, u32))0x107F4F7C)
#define FS_MEMSET ((void* (*)(void*, int, u32))0x107F5018)
#define FS_VSNPRINTF ((int (*)(char * s, size_t n, const char * format, va_list arg))0x107F5F68)
#define FS_SNPRINTF ((int (*)(char * s, size_t n, const char * format, ...))0x107F5FB4)
2017-03-25 22:05:37 +01:00
#define FS_STRNCPY ((void* (*)(char*, const char*, u32))0x107F60DC)
#define FS_STRNCMP ((int (*)(const char*, const char*, u32))0x107F6138)
#define FS_SAFE_STRLEN ((int (*)(const char*, u32))0x107F61BC)
2016-12-12 19:31:02 +01:00
#define FS_RAW_READ1 ((int (*)(int handle, u32 offset_high, u32 offset_low, u32 size, void* buf, void *callback, int callback_arg))0x10732BC0)
#define FS_SDIO_DOREADWRITECOMMAND ((int (*)(int, void*, u32, void*, void*))0x10718A8C)
#define FS_REGISTERMDPHYSICALDEVICE ((int (*)(void*, int, int))0x10718860)
2017-03-25 22:05:37 +01:00
#define memcmp FS_MEMCMP
2016-12-12 19:31:02 +01:00
#define memcpy FS_MEMCPY
#define memset FS_MEMSET
2017-03-25 22:05:37 +01:00
#define strncpy FS_STRNCPY
#define strncmp FS_STRNCMP
#define strlen(x) FS_SAFE_STRLEN(x, 0x1000)
2016-12-12 19:31:02 +01:00
#define FS_MMC_SDCARD_STRUCT ((vu32*)0x1089B9F8)
#define FS_MMC_MLC_STRUCT ((vu32*)0x1089B948)
#define FS_MLC_PHYS_DEV_STRUCT ((void*)0x11C3A14C)
#define FS_SLC_PHYS_DEV_STRUCT ((void*)0x11C381CC)
#define FS_SLCCMPT_PHYS_DEV_STRUCT ((void*)0x11C37668)
#define le16(i) ((((u16) ((i) & 0xFF)) << 8) | ((u16) (((i) & 0xFF00) >> 8)))
#define le32(i) ((((u32)le16((i) & 0xFFFF)) << 16) | ((u32)le16(((i) & 0xFFFF0000) >> 16)))
#define le64(i) ((((u64)le32((i) & 0xFFFFFFFFLL)) << 32) | ((u64)le32(((i) & 0xFFFFFFFF00000000LL) >> 32)))
#endif // IMPORTS_H_