forked from waninkoko/es-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswi_mload.c
More file actions
39 lines (31 loc) · 704 Bytes
/
swi_mload.c
File metadata and controls
39 lines (31 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "tools.h"
#include "types.h"
void Swi_Memcpy(void *dst, void *src, s32 len)
{
/* Wrong length */
if (len <= 0)
return;
/* Call function */
Swi_MLoad(2, (u32)dst, (u32)src, (u32)len);
}
void Swi_uMemcpy(void *dst, void *src, s32 len)
{
/* Wrong length */
if (len <= 0)
return;
/* Call function */
Swi_MLoad(9, (u32)dst, (u32)src, (u32)len);
}
s32 Swi_CallFunc(s32 (*func)(void *in, void *out), void *in, void *out)
{
/* Call function */
return Swi_MLoad(16, (u32)func, (u32)in, (u32)out);
}
u32 Swi_GetSyscallBase(void)
{
return Swi_MLoad(17, 0, 0, 0);
}
u32 Swi_GetIosInfo(void *buffer)
{
return Swi_MLoad(18, (u32)buffer, 0, 0);
}