Announcement

Collapse
No announcement yet.

(Artemis) Thoughts or Ideas

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Gtlcpimp View Post
    Has anyone actually been able to open a file during gameplay of any game? [...]
    Yes. http://gshi.org/vb/showthread.php?p=29650#post29650

    Originally posted by Pyriel View Post
    [...] My thought was to have the IOP request bus transfers, so that user commands could be responded to without any intervention from the EE. Well, at least there would little EE involvement in requests that don't require any complex handling, such as "dump 1KB of RAM starting at 0x300000". The only thing is, I haven't had time to truly check whether such a transfer request will work. The documentation I have indicates that it will, but as we've seen, in practice things are usually a bit thornier than we hoped. [...]
    What exactly do you mean with "bus transfers"? And what is this documentation you're talking about? Sounds interesting.

    Comment


    • #17
      It's SIF/DMA stuff. What I've read is a variety of presumably up-to-date and obviously outdated information, and it'd be difficult for me to point you to the exact material. Some of the references were just random threads on ps2dev.org, which are notorious for ending before they actually pay off. Someone was trying to do something similar (retrieve EE RAM with a DMA call from the IOP), and the regulars seemed to think it would work, but the discussion died about six posts in without really reaching a conclusion.

      Shortly thereafter, I set about rebuilding the ps2 tool chain so I could test it, and haven't yet got around to it. Partly because my PS2 is still in storage.

      Comment


      • #18
        Pyriel: I keep a pre-built toolchain on GSHI, with quite a few significant libs, fixes, updates, and patches:

        http://gshi.org/downloads/GSHI_PS2SDK.zip

        ...in case that's of any use to you. Building with Cygwin is near impossible, and as of late, MinGW has been quite dastardly as well, though I don't know why specifically. The toolchain here is fully updated, however.
        I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

        Comment


        • #19
          Originally posted by Pyriel View Post
          It's SIF/DMA stuff. [...] Someone was trying to do something similar (retrieve EE RAM with a DMA call from the IOP), and the regulars seemed to think it would work [...]
          Alright, please tell us about any progress being made. Hopefully, I can come up with some proof of concept code to test the idea of shared memory. But beforehand, I have to do some more work on other parts of Artemis.

          Lazy, IIRC Pyriel is a Linux user like me.

          Comment


          • #20
            Ah, even better That means he'll be able to make use of ROMFS and Libito, if need be.
            I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

            Comment


            • #21
              Yeah, Linux user. Sorry, what I meant was that I hadn't gotten around to testing the idea. It was the work of about 30 minutes to get the toolchain built.

              Comment


              • #22
                Originally posted by misfire View Post
                Yes. http://gshi.org/vb/showthread.php?p=29650#post29650


                What exactly do you mean with "bus transfers"? And what is this documentation you're talking about? Sounds interesting.
                Originally posted by misfire View Post
                I was able to write to mc0 in game.

                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.
                How did you come about building this module that can perform those actions during a game play of any game? Care to share the source to help us out?

                Comment


                • #23
                  Of course, I will post the code here or add it to the SVN repo ASAP.

                  Comment


                  • #24
                    Originally posted by misfire View Post
                    Of course, I will post the code here or add it to the SVN repo ASAP.
                    Dirty little SVN... I never really use it, so how about here Thanks in advanced

                    Comment


                    • #25
                      I've added the source code of lsmod.irx to the repo and also attached a tarball here.

                      Project:
                      http://gshi.org/svn/artemis/trunk/lsmod/

                      Readme:
                      http://gshi.org/svn/artemis/trunk/lsmod/README

                      Sample output:
                      http://gshi.org/svn/artemis/trunk/lsmod/modlist
                      Attached Files
                      Last edited by misfire; 09-12-2008, 05:37:15 AM.

                      Comment


                      • #26
                        Thanks misfire, I'll take a look at it.

                        For this, I recommend
                        calling the game's SifLoadModule() function from your code.
                        Do you mean I have to spend time to find the game's SifLoadModule() function and call it or will it still work if I just called the one compiled in my .ELF file?

                        Comment


                        • #27
                          Actually, it's pretty easy to find SifLoadModule() as its first parameter is always the module file name, e.g. "cdrom0:\IOP\MCMAN.IRX;1". You can use ps2dis to find such a string and all references to it. If a function is called with register a0 containing a pointer to a module name, it's most likely SifLoadModule().

                          Also, don't forget to call sbv_patch_disable_prefix_check() if you're loading lsmod.irx from mc0 (which you will most certainly do).

                          It may also work if you use the SIF code compiled in your ELF (IIRC, PS2 ZoneLoader calls its own Sif* functions), but I'd rather avoid any additional footprint and keep the code as small as possible.

                          Comment


                          • #28
                            Originally posted by misfire View Post
                            Actually, it's pretty easy to find SifLoadModule() as its first parameter is always the module file name, e.g. "cdrom0:\IOP\MCMAN.IRX;1". You can use ps2dis to find such a string and all references to it. If a function is called with register a0 containing a pointer to a module name, it's most likely SifLoadModule().

                            Also, don't forget to call sbv_patch_disable_prefix_check() if you're loading lsmod.irx from mc0 (which you will most certainly do).

                            It may also work if you use the SIF code compiled in your ELF (IIRC, PS2 ZoneLoader calls its own Sif* functions), but I'd rather avoid any additional footprint and keep the code as small as possible.
                            On another note, if you were to have trouble loading from mc0(Not using the games sifloadmodule() ), couldnt you store the irx in a byte array and load it using SifLoadStartModuleBuffer() or SifLoadModuleBuffer()? The last time I tried to access mc0 from EE in game caused my PS2 to freeze. I used the open and close functions in the ps2sdk... so I reckon thats why it froze(compatability.) ... even though they are basic functions.

                            Correction: You would use SifExecModuleBuffer(); My mistake. I read a little more into it. This function takes a module from a buffer in ee ram and moves it into the IOP and calls SifLoadModuleBuffer(); on it. In order to use SifLoadStartModuleBuffer, the buffer would have to already be in IOP ram. (Read from public documentation) Off to test this Thx misfire
                            Last edited by Derek8588; 09-15-2008, 03:17:15 PM.

                            Comment


                            • #29
                              Originally posted by Derek8588 View Post
                              On another note, if you were to have trouble loading from mc0(Not using the games sifloadmodule() ), couldnt you store the irx in a byte array and load it using SifLoadStartModuleBuffer() or SifLoadModuleBuffer()? [...]
                              Should work if you apply sbv_patch_enable_lmb().

                              Comment


                              • #30
                                Originally posted by misfire View Post
                                Also, don't forget to call sbv_patch_disable_prefix_check() if you're loading lsmod.irx from mc0 (which you will most certainly do).
                                Originally posted by misfire View Post
                                Should work if you apply sbv_patch_enable_lmb().
                                Whoa now, easy there partner. Even though I have heard of this "sbv patch" crap, I still have never used them. What exactly are they, and what headers / modules must I include to use it / them? Also, what do they do exactly?

                                Comment

                                Working...
                                X