7 #include <fileXio_rpc.h>
11 #include <sbv_patches.h>
12 #include <iopcontrol.h>
18 #define IP_ADDR "192.168.0.10"
19 #define NETMASK "255.255.255.0"
20 #define GATEWAY "192.168.0.1"
22 extern void poweroff_irx
;
23 extern int size_poweroff_irx
;
24 extern void ps2dev9_irx
;
25 extern int size_ps2dev9_irx
;
26 extern void smsutils_irx
;
27 extern int size_smsutils_irx
;
28 extern void lanman_irx
;
29 extern int size_lanman_irx
;
30 extern void iomanx_irx
;
31 extern int size_iomanx_irx
;
32 extern void filexio_irx
;
33 extern int size_filexio_irx
;
36 #define IPCONFIG_MAX_LEN 64
37 static char g_ipconfig
[IPCONFIG_MAX_LEN
] __attribute__((aligned(64)));
38 static int g_ipconfig_len
;
40 //--------------------------------------------------------------
41 void set_ipconfig(void)
43 memset(g_ipconfig
, 0, IPCONFIG_MAX_LEN
);
46 strncpy(&g_ipconfig
[g_ipconfig_len
], IP_ADDR
, 15);
47 g_ipconfig_len
+= strlen(IP_ADDR
) + 1;
48 strncpy(&g_ipconfig
[g_ipconfig_len
], NETMASK
, 15);
49 g_ipconfig_len
+= strlen(NETMASK
) + 1;
50 strncpy(&g_ipconfig
[g_ipconfig_len
], GATEWAY
, 15);
51 g_ipconfig_len
+= strlen(GATEWAY
) + 1;
54 //--------------------------------------------------------------
55 int main(int argc
, char *argv
[2])
61 scr_printf("\t lanlab\n\n");
65 scr_printf("\t IOP Reset... ");
67 while(!SifIopReset("rom0:UDNL rom0:EELOADCNF",0));
68 while(!SifIopSync());;
82 sbv_patch_enable_lmb();
83 sbv_patch_disable_prefix_check();
85 SifLoadModule("rom0:SIO2MAN", 0, 0);
86 SifLoadModule("rom0:MCMAN", 0, 0);
87 SifLoadModule("rom0:MCSERV", 0, 0);
88 SifLoadModule("rom0:PADMAN", 0, 0);
94 scr_printf("\t loading iomanX... ");
95 id
= SifExecModuleBuffer(&iomanx_irx
, size_iomanx_irx
, 0, NULL
, &ret
);
96 scr_printf("ret=%d\n", ret
);
98 scr_printf("\t loading fileXio... ");
99 id
= SifExecModuleBuffer(&filexio_irx
, size_filexio_irx
, 0, NULL
, &ret
);
100 scr_printf("ret=%d\n", ret
);
102 scr_printf("\t loading poweroff... ");
103 id
= SifExecModuleBuffer(&poweroff_irx
, size_poweroff_irx
, 0, NULL
, &ret
);
104 scr_printf("ret=%d\n", ret
);
106 scr_printf("\t loading ps2dev9... ");
107 id
= SifExecModuleBuffer(&ps2dev9_irx
, size_ps2dev9_irx
, 0, NULL
, &ret
);
108 scr_printf("ret=%d\n", ret
);
110 scr_printf("\t loading smsutils... ");
111 id
= SifExecModuleBuffer(&smsutils_irx
, size_smsutils_irx
, 0, NULL
, &ret
);
112 scr_printf("ret=%d\n", ret
);
114 scr_printf("\t loading lanman... ");
115 id
= SifExecModuleBuffer(&lanman_irx
, size_lanman_irx
, 0, NULL
, &ret
);
116 scr_printf("ret=%d\n", ret
);
118 scr_printf("\t modules load OK\n");
120 printf("printf test!\n");