By my understanding arguments are stored in variables called argv[0], argv[1] etc.
Find the main() of the app you want to modify, and add some code to detect if whatever argument the ROM is exists (I think its argv[1], and argv[0] is the path of the loaded DOL, but I could be wrong).
So something like this I think:
if(argv[1])
{
...code here...
}
the "...code here..." part should be to call the emulator's ROM loading function (look through the source, maybe you can find it), passing it argv[1] as the ROM path
Beyond this, I don't know anything more. I'm not at all experienced in programming, and some of what I said may be slightly inaccurate. I hope this helps at least a little.