Code: Select all
SifInitRpc(0);
init_scr();
struct remote_data * datarem;
datarem = (struct remote_data *) malloc(sizeof(struct remote_data));
SifExitIopHeap ();
SifLoadFileExit();
SifExitRpc ();
SifIopReset ( "rom0:UDNL rom0:EELOADCNF", 0 );
while ( SifIopSync () );
SifInitRpc ( 0 );
SifLoadModule("rom0:ADDDRV", 0, NULL);
SifLoadModule("rom1:SIO2MAN", 0, NULL);
SifLoadModule("rom1:RMMAN", 0, NULL);
scr_printf("RMMan_Init()... ");
int ret = 0;
ret = RMMan_Init(); // stops here with loaded anything other than rom1 stuff =(
if (ret == 1) scr_printf("[ OK ]\n");
else scr_printf("[FAILED]\n\tRMMan_Init() returned %d (bad).\n", ret);
scr_printf("RMMan_GetModuleVersion()... ");
ret = RMMan_GetModuleVersion();
scr_printf("[ v%d ]\n", ret);
scr_printf("RMMan_Open()... ");
ret = RMMan_Open(0, 0, paddata);
if (ret == 1) scr_printf("[ OK ]\n");
else scr_printf("[FAILED]\n\tRMMan_Open() returned %d (bad).\n", ret);
scr_printf("INITIALISATION COMPLETE\n");
scr_printf("\nPress the remote buttons now:\n");
while(1)
{
RMMan_Read(0, 0,datarem);
//check returns and print if new things appened :)
//scr_printf("data_status = %x, data_button = %x, paddata: %s\n",datarem->status,datarem->button,paddata);
if(datarem->status == RM_KEYPRESSED)
{
scr_printf("return of the remote : %x\n", datarem->button);
}
}
return 0;
(I believe my english is the biggest worst you ever seen, but the most of my time i spend at developing apps rather than learning perfect english. =:)