forked from belek666/Open-PS2-Loader
-
Notifications
You must be signed in to change notification settings - Fork 4
/
debug.c
58 lines (46 loc) · 1.16 KB
/
debug.c
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
Copyright 2010, jimmikaelakel
Licenced under Academic Free License version 3.0
Review OpenUsbLd README & LICENSE files for further details.
*/
#include "include/opl.h"
#include "include/ethsupport.h"
#include "include/system.h"
#include "include/ioman.h"
#include "include/extern_irx.h"
static u8 modulesLoaded = 0;
int debugSetActive(void)
{
#ifndef _DTL_T10000
int ret;
if ((ret = ethLoadInitModules()) != 0)
return -1;
#ifdef __DECI2_DEBUG
ret = sysLoadModuleBuffer(&drvtif_irx, size_drvtif_irx, 0, NULL);
if (ret < 0)
return -8;
ret = sysLoadModuleBuffer(&tifinet_irx, size_tifinet_irx, 0, NULL);
if (ret < 0)
return -9;
#else
ret = sysLoadModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL);
if (ret < 0)
return -8;
ret = sysLoadModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL);
if (ret < 0)
return -9;
ret = sysLoadModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL);
if (ret < 0)
return -10;
#endif
#endif
modulesLoaded = 1;
return 0;
}
void debugApplyConfig(void)
{
#ifndef _DTL_T10000
if (modulesLoaded)
ethApplyConfig();
#endif
}