zektor said:// build the argumentsDr. Clipper said:@zektor: Have you worked out how to pass arguments to the loader yet, so that we don't need the 222 version of the channel any more? That way you could just hold the B button during load to get 222 instead of 249 or vice versa.
I wish. I am certainly no expert. I download source, analyze it, dabble, read, and dabble some moreI couldn't even get USB forwarding working correctly without Narolez's help (he actually completely revamped the code) so something like this is truly beyond my scope at the moment. I'll look around at similar sources that perform this function and see if I could accomplish it, but don't hold your breathI am definitely no code guru...
Take a look on my NForwarder code in main.c, arguments (filename of dol) are already passed:
CODE
struct __argv arg;
bzero(&arg, sizeof(arg));
arg.argvMagic = ARGV_MAGIC;
arg.length = strlen(filename) + 2;
arg.commandLine = malloc(arg.length);
strcpy(arg.commandLine, filename);
arg.commandLine[arg.length - 1] = '\x00';
arg.argc = 1;
arg.argv = &arg.commandLine;
arg.endARGV = arg.argv + 1;
// run the dol form SD or USB with arguments
run_dol(myBuffer, &arg);
Feel free to extend the code to pass the IOS argument.