PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
7
#include <
tamtypes.h
>
8
#include <
stdio.h
>
9
#include <
loadcore.h
>
10
#include <
thbase.h
>
11
#include "
iopdebug.h
"
12
13
#include "
iopdebug_priv.h
"
14
15
IRX_ID(
"iopdebug"
, 1, 0);
16
17
extern
struct
irx_export_table
_exp_iopdebug;
18
int
_start(
int
argc,
char
*argv[])
19
{
20
(void)argc;
21
(void)argv;
22
23
// install IOP debug system.
24
if
(iop_dbg_install() != 0)
25
{
26
//printf("Failed installing IOP debug system!\n");
27
return
MODULE_NO_RESIDENT_END;
28
}
29
30
// register our IRX exports.
31
if
(RegisterLibraryEntries(&_exp_iopdebug) != 0)
32
{
33
iop_dbg_remove();
34
35
//printf("Error registering library!\n");
36
return
MODULE_NO_RESIDENT_END;
37
}
38
39
FlushIcache();
40
FlushDcache();
41
42
//printf("IOPDEBUG installed!\n");
43
44
return
MODULE_RESIDENT_END;
45
}
46
// export 2, called when the module is being unloaded(like when IOP is being "rebooted").
47
int
_stop(
int
argc,
char
*argv[])
48
{
49
(void)argc;
50
(void)argv;
51
52
// remove IOP debug system.
53
if
(iop_dbg_remove() != 0)
54
{
55
//printf("Failed removing IOP debug handlers!\n");
56
}
57
58
return
MODULE_NO_RESIDENT_END;
59
}
60
iopdebug.h
iopdebug_priv.h
irx_export_table
Definition
irx.h:90
loadcore.h
stdio.h
tamtypes.h
thbase.h
iop
debug
iopdebug
src
main.c
Generated on Thu Nov 14 2024 05:25:26 for PS2SDK by
1.9.8