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 discid_irx
;
23 extern int size_discid_irx
;
24 extern void poweroff_irx
;
25 extern int size_poweroff_irx
;
26 extern void ps2dev9_irx
;
27 extern int size_ps2dev9_irx
;
28 extern void smsutils_irx
;
29 extern int size_smsutils_irx
;
30 extern void smstcpip_irx
;
31 extern int size_smstcpip_irx
;
32 extern void smsmap_irx
;
33 extern int size_smsmap_irx
;
34 extern void ps2atad_irx
;
35 extern int size_ps2atad_irx
;
36 extern void ps2hdd_irx
;
37 extern int size_ps2hdd_irx
;
38 extern void hdldsvr_irx
;
39 extern int size_hdldsvr_irx
;
40 extern void iomanx_irx
;
41 extern int size_iomanx_irx
;
42 extern void filexio_irx
;
43 extern int size_filexio_irx
;
46 #define IPCONFIG_MAX_LEN 64
47 static char g_ipconfig
[IPCONFIG_MAX_LEN
] __attribute__((aligned(64)));
48 static int g_ipconfig_len
;
50 static char hddarg
[] = "-o" "\0" "4" "\0" "-n" "\0" "20";
52 //--------------------------------------------------------------
53 void set_ipconfig(void)
55 memset(g_ipconfig
, 0, IPCONFIG_MAX_LEN
);
58 strncpy(&g_ipconfig
[g_ipconfig_len
], IP_ADDR
, 15);
59 g_ipconfig_len
+= strlen(IP_ADDR
) + 1;
60 strncpy(&g_ipconfig
[g_ipconfig_len
], NETMASK
, 15);
61 g_ipconfig_len
+= strlen(NETMASK
) + 1;
62 strncpy(&g_ipconfig
[g_ipconfig_len
], GATEWAY
, 15);
63 g_ipconfig_len
+= strlen(GATEWAY
) + 1;
66 //--------------------------------------------------------------
67 int main(int argc
, char *argv
[2])
73 scr_printf("\t hdldsvrlab\n\n");
77 scr_printf("\t IOP Reset... ");
79 while(!SifIopReset("rom0:UDNL rom0:EELOADCNF",0));
80 while(!SifIopSync());;
94 sbv_patch_enable_lmb();
95 sbv_patch_disable_prefix_check();
97 SifLoadModule("rom0:SIO2MAN", 0, 0);
98 SifLoadModule("rom0:PADMAN", 0, 0);
104 scr_printf("\t loading modules... ");
106 id
= SifExecModuleBuffer(&discid_irx
, size_discid_irx
, 0, NULL
, &ret
);
107 id
= SifExecModuleBuffer(&iomanx_irx
, size_iomanx_irx
, 0, NULL
, &ret
);
108 id
= SifExecModuleBuffer(&filexio_irx
, size_filexio_irx
, 0, NULL
, &ret
);
109 id
= SifExecModuleBuffer(&poweroff_irx
, size_poweroff_irx
, 0, NULL
, &ret
);
110 id
= SifExecModuleBuffer(&ps2dev9_irx
, size_ps2dev9_irx
, 0, NULL
, &ret
);
111 id
= SifExecModuleBuffer(&smsutils_irx
, size_smsutils_irx
, 0, NULL
, &ret
);
112 id
= SifExecModuleBuffer(&smstcpip_irx
, size_smstcpip_irx
, 0, NULL
, &ret
);
113 id
= SifExecModuleBuffer(&smsmap_irx
, size_smsmap_irx
, g_ipconfig_len
, g_ipconfig
, &ret
);
114 id
= SifExecModuleBuffer(&ps2atad_irx
, size_ps2atad_irx
, 0, NULL
, &ret
);
115 id
= SifExecModuleBuffer(&ps2hdd_irx
, size_ps2hdd_irx
, sizeof(hddarg
), hddarg
, &ret
);
116 id
= SifExecModuleBuffer(&hdldsvr_irx
, size_hdldsvr_irx
, 0, NULL
, &ret
);