If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. Also, before requesting
codes, note that there is a main site, which may contain what you
are looking for already. Also, if you know what you want, feel free to
search for it directly.
For debugging purposes, I developed a small IRX module that does nothing more than printing a list of all loaded modules and their attributes to a text file on mc0. IIRC, I used low level I/O functions (open, write, close) and an open source implementation of sprintf for it (the native one is broken!).
However, there's no RPC involved here, but it's a beginning.
cYs Driver, from a quick look at your source code I can tell you that it is not going to work.
I see that you're using the .resident section for stuff that needs to stay in memory. I've used this trick myself, but soon realized the problem that comes with it: It doesn't take care of the called SDK functions (memcpy, fio* functions, RPC crap, etc.). Those have to be put in resident memory too! (Unless you abuse the game's code.)
The best solution is to compile _two_ ELF files. The first one contains the payload - the code you want to keep alive. You must set the ELF's load address to 0x00080000, for example. The second ELF is the loader which copies the contents of the payload to its load address (0x00080000). I did this by creating a C header file which stores the contents in a byte array. The loader's address can be anywhere above 0x00100000.
cYs Driver, from a quick look at your source code I can tell you that it is not going to work.
I see that you're using the .resident section for stuff that needs to stay in memory. I've used this trick myself, but soon realized the problem that comes with it: It doesn't take care of the called SDK functions (memcpy, fio* functions, RPC crap, etc.). Those have to be put in resident memory too! (Unless you abuse the game's code.)
The best solution is to compile _two_ ELF files. The first one contains the payload - the code you want to keep alive. You must set the ELF's load address to 0x00080000, for example. The second ELF is the loader which copies the contents of the payload to its load address (0x00080000). I did this by creating a C header file which stores the contents in a byte array. The loader's address can be anywhere above 0x00100000.
if you look in the file linkfile you'll see that the .text section is also loaded in resident memory, either that or i've uploaded the wrong linkfile but loading the .text section into resident memory will take care of loading in stuff like memcpy etc, i then sjcrunched the main code so that it loaded in user land then sjcrunch decompressed it into resident memory and executed it, even still this did not work
But concrats on your IOP module
Last edited by cYs Driver; 08-28-2008, 08:00:21 AM.
Yes, the whole IOP module crap is one of the greatest issues; we have to take care of dependencies, IOP resets, and whatnot. I think it will be difficult to find a generic solution for it.
Actually, I was able to initialize TCP/IP while running a game (TimeSplitters PAL). What I did was to call the game's SifLoadModule() function to load the network modules from memory card (requires a SBV patch) after the game has loaded its own ones. That way I was able to continuously send a "ping" from PS2 to PC. I haven't done more work on it yet.
I've applied the same method to load the other module I mentioned.
The ability to make the PS2 send packets to the PC during gameplay means we could at least attach that process to a button combination (or sequence, even), and potentially force memory dumps to PC (though we'd have no way of testing codes, and we'd have to use a PC-side compare application to narrow results). That is, if we can perform a dump of memory.
Comment