PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
patch_disable_prefix_check.c
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
#include <
tamtypes.h
>
17
#include <
kernel.h
>
18
#include <string.h>
19
20
#include "
slib.h
"
21
22
extern
slib_exp_lib_list_t
_slib_cur_exp_lib_list;
23
24
int
sbv_patch_disable_prefix_check
(
void
)
25
{
26
union
{
27
u8 buf[256];
28
slib_exp_lib_t
exp_lib;
29
} buf;
30
static
u32 patch[2] ALIGNED(16)={
31
0x03e00008,
/* jr $ra */
32
0x00001021
/* addiu $v0, $0, 0 */
33
};
34
SifDmaTransfer_t
dmat;
35
slib_exp_lib_t
*modload_lib = &buf.exp_lib;
36
37
memset(&_slib_cur_exp_lib_list, 0,
sizeof
(
slib_exp_lib_list_t
));
38
39
if
(!
slib_get_exp_lib
(
"modload"
, modload_lib))
40
return
-1;
41
42
dmat.src=patch;
43
dmat.size=
sizeof
(patch);
//16-bytes will be written to IOP RAM, but the function on the IOP side is longer than 16 bytes in length.
44
dmat.dest=modload_lib->exports[15];
45
dmat.attr=0;
46
47
SifSetDma(&dmat, 1);
48
49
return
0;
50
}
kernel.h
sbv_patch_disable_prefix_check
int sbv_patch_disable_prefix_check(void)
Definition
patch_disable_prefix_check.c:24
t_SifDmaTransfer
Definition
sifdma.h:53
slib.h
slib_get_exp_lib
int slib_get_exp_lib(const char *name, slib_exp_lib_t *library)
Definition
slib.c:103
_slib_exp_lib
Definition
slib.h:32
_slib_exp_lib_list
Definition
slib.h:45
tamtypes.h
ee
sbv
src
patch_disable_prefix_check.c
Generated on Thu Nov 14 2024 05:25:25 for PS2SDK by
1.9.8