sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
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
15
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
static
const
u32 g_patch[2] = {
25
0x03e00008,
/* jr $ra */
26
0x00001021
/* addiu $v0, $0, 0 */
27
};
28
29
int
sbv_patch_disable_prefix_check
(
void
)
30
{
31
union
{
32
u8 buf[256];
33
slib_exp_lib_t
exp_lib;
34
} buf;
35
static
u32 patch[
sizeof
(g_patch)/
sizeof
(g_patch[0])] ALIGNED(16);
36
SifDmaTransfer_t dmat;
37
slib_exp_lib_t
*modload_lib = &buf.exp_lib;
38
39
memcpy(UNCACHED_SEG(patch), g_patch,
sizeof
(g_patch));
40
memset(&_slib_cur_exp_lib_list, 0,
sizeof
(
slib_exp_lib_list_t
));
41
42
if
(!
slib_get_exp_lib
(
"modload"
, modload_lib))
43
return
-1;
44
45
dmat.src=patch;
46
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.
47
dmat.dest=modload_lib->exports[15];
48
dmat.attr=0;
49
50
sceSifSetDma(&dmat, 1);
51
52
return
0;
53
}
kernel.h
sbv_patch_disable_prefix_check
int sbv_patch_disable_prefix_check(void)
Definition
patch_disable_prefix_check.c:29
slib.h
slib_exp_lib_list_t
struct _slib_exp_lib_list slib_exp_lib_list_t
slib_get_exp_lib
int slib_get_exp_lib(const char *name, slib_exp_lib_t *library)
Definition
slib.c:103
slib_exp_lib_t
struct _slib_exp_lib slib_exp_lib_t
string.h
tamtypes.h
core
sbv
src
patch_disable_prefix_check.c
Generated by
1.18.0