Announcement

Collapse
No announcement yet.

PS2 ZoneLoader

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

  • PS2 ZoneLoader

    If you are interested in Project Artemis, the freely available source code of PS2 ZoneLoader is definitely worth a look.

    It shows you how to make code memory-resident. Also, it applies a very tricky method to patch the video mode of games.

    NOTE: The CD/DVD images include a newer version of the ZoneLoader ELF which wasn't built from the available sources.

    For those unfamiliar with ZoneLoader, it is basically like PS2 CogSwapLoader or CD Loader as it allows you to launch 'problem' PS2 games when swapped in-between the Swap Magic Discs. Many of the games that are plagued by these issues are those that contain multiple ELF files, for example, Hitman 2 and Splinter Cell.
    Source:
    http://www.ps3news.com/forums/site-n...more-4500.html
    Attached Files
    Last edited by misfire; 08-15-2008, 02:47:06 AM.

  • #2
    Good point; I never took a detailed look at the source for ZoneLoader.

    However, keep in mind that the "Direct Boot Docs" are erroneous (I know this both first-hand and second-hand). XorLoser will also attest to that.
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

    Comment


    • #3
      Incidentally (though successful compilation isn't necessarily required to learn from this source), in trying to update the ZoneLoader source to compile with the current toolchain, I've run into a roadblock:

      Code:
      bootmaster.h:16:19: sjgfx.h: No such file or directory
      I can't even find mention of this file anywhere on the 'net. Judging by the title, it might be an old graphics header written by sjeep (sj = sjeep; gfx = graphics), but who knows. Any idea?
      I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

      Comment


      • #4
        Actually, the compiled ELF wasn't built from the given source code.

        Some time ago I tried to add the code of yposHandler() from hax0r_asm.S to one of my projects. Strangely, video mode patching didn't work as good as it does when using the compiled ZoneLoader ELF directly. Therefore, I disassembled the function and noticed the difference - they fixed yposHandler(). (Of course, I adapted my code. )

        So the source code is definitely out-of-date.

        libsjgfx seems to be some old graphics library from the days of ps2lib.
        Last edited by misfire; 08-13-2008, 08:50:53 AM.

        Comment


        • #5
          Ah, interesting. If only I could dig up that lib, if only to experiment a bit with the (outdated, partially functional) ZoneLoader source.
          I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

          Comment


          • #6
            The code is interesting nonetheless.

            Here's how video mode patching is done:
            - hook the syscall SetGsCrt() to force a specific video mode (PAL or NTSC)
            - set a hardware breakpoint at the GS registers 0x12000080 (GS_REG_DISPLAY1) and 0x120000A0 (GS_REG_DISPLAY2) to detect any write attempts and patch the screen position after a hit

            This is very straightforward and works for almost any game.

            Thought this clever idea is worth sharing.

            Comment


            • #7
              Also, a correction: The ELF files from PS2_ZoneLoader_SRC+Direct-Boot_Docs.zip might have been built from the provided source code. Actually, the ZoneLoader CD/DVD images (available from ps3news.com) include a newer version of the ELF file. This is where I got the fixed yposHandler() code from. Took a while to remember it...

              I've added the ZoneLoader images to the first post.

              Comment


              • #8
                Hi mates! How great finding this topic here!!!

                I'm in a quest to make Zoneloader compatible with HDloader.
                I started a thread at www.psx-scene.com :

                http://www.psx-scene.com/forums/ps2-...-possible.html

                Since everyone has taken notice that Zoneloader source was available, people started thinking that this could even be possible. In the above thread link I did a suggestion in how to make that, but I couldn't test it. But by that moment I didn't know anything about ELF files compilation and so. Then I began to look for answers. Here at GSHI I started learning a lot with its topics and links -THANK YOU GUYS!!!-
                Well, let me say the right point I'm:
                - I've succesfully installed MinGW+MSYS+PS2SDK (I guess )
                - I got compiling the given samples successfully : Hello PS2!, cube, graph, teapot,... but I'm not so sure about others since I didn't get what they should do : mpeg, texture, the rcp ones... I tested them all with my PS2 SCPH 30000 (a jap console) + FMCB + USB stick.

                Ok, let come back to Zoneloader . I tried to compile it and I got a kind of ERROR 1 and a msg cannot find -lpad:



                Now, I'm stucked and I don't have any idea in how to get through this. Could you guys help me? I will apreciate your help very much! I should have paid more attention at my C++ and Turbo Pascal classes !!!Thanks in advance!
                Last edited by Bon Scott; 12-01-2008, 09:25:18 AM.

                Comment


                • #9
                  Somehow, I never noticed this post.

                  Personally, the first error I run into is one concerning -fnonnull-objects. Are you using the latest version of gshi_ps2sdk (the pre-built, MinGW Win32 PS2SDK)?

                  Anyway, there are several old functions used in this source, that are either now redundant (something else that's standard already does whatever it is they used to do), or have been phased out for some other reason. Generally, you can simply remove the trouble-making flags, and everything will work fine. I think I remember running into some other issues with ZoneLoader, though. I'll take a look, and let you know.
                  I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                  Comment


                  • #10
                    Oh right...I even mentioned them earlier in this thread, heh. After removing some archaic flags and giving it another go, I get brick-walled at "bootmaster.h:16:19: sjgfx.h: No such file or directory", because it can't find libsjgfx, let alone sjgfx.h. I can't find a thing about this missing library, so I made a thread concerning it at PS2Dev.org, in the hope that someone there has some useful knowledge as to where I might find it:

                    http://forums.ps2dev.org/viewtopic.php?p=78394#78394
                    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                    Comment


                    • #11
                      Please remember that the CD/DVD images include a newer version of the ZoneLoader ELF which wasn't built from the available sources.

                      That means you are trying to compile outdated sources.

                      Comment


                      • #12
                        That's OK; it would still be useful.
                        I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

                        Comment


                        • #13
                          Dear masters,

                          Did anybody get this libgsgfx? Or even made a turnaround in order to get PS2ZoneLoader compiled?

                          I did my best tryng to mod gsKit / gslib libraries and recompile PS2 ZoneLoader with them but unhappily I had no sucess on it. :-(....


                          I intend to use part of its code to make an TSR routine that force customized VGA modes on games booted by HDLoader.

                          Best regards,

                          PS: What a pity that psx-scene site domain has gone... Snif...

                          Comment


                          • #14
                            Because I had no response, I tried again to put PNSelector (PAL/NTSC selector) from PS2 Zone Loader into uLE source.

                            It is almost compiling, when it happens I will port PNSelector to VGA selector, make some code cleanup, discover the best place to put this TSR code in RAM Kernel Area (in order to HDLoader does not kill TSR - Like ffgriever made with IGR), etc.

                            I would like to know if there is somebody interested in this subject (make HDLoader games run in a forced VGA mode).

                            Note that, differently from other VGA tools (Blaze VGA, Xploder HDTV Player, and Matrix Infinity modchip), I think the results would be best, due to the correct use of MAGH / MAGV (magnification in horizontal / vertical) fields from DISPLAY1/DISPLAY2, and INTERLACED (on/off) and FIELD/FRAME options from GS (Graphics Synthesizer) registers.

                            It could be possible to keep the screen full filled even in higher resolutions manipulating these info (issue not addressed correctly by Xploder), and with best resolution when a GAME have 448 lines interlaced instead of 224 lines doubled (it seems Infinity always doubles first frame, instead of decide it in function of game type. Because mixing 2 frames to get a 448 line field is the best choice in games that has two frames. Apparently, this the reason TP2 (Thunder Pro II) modchip has better VGA modes than Infinity.

                            Aditional info, that can be useful to understand what I am writing here.

                            GT4 has 640 x 512 real resolution to produce virtual resolution of 1920 x 1080 (HDTV 1080i mode):
                            640 x 3 = 1920 (using MAGH 3x)
                            512 x 2 = 1080 (using MAGV 2x)

                            Some NTSC Fighting Games has 512 x 224 source resolution, which is manipulated to get a target resolution of 512 x 448 (interlacing 2 identical frames):
                            224 + 224 = 448i ("480i") -> Worst resolution

                            Some NTSC games has 512 x 448 source resolution, which is manipulated to get a target resolution of 512 x 448 (interlacing 2 different frames of 224 lines each):
                            224 + 224 = 448i ("480i") -> Better resolution

                            This examples help to understand the issues of ps2force480p tool from asmodean.
                            Last edited by doctorxyz; 06-21-2009, 09:24:06 AM. Reason: Clarifying information

                            Comment


                            • #15
                              Hi all,

                              We made progress on this subject...!

                              Are you interested? If so, get further info on "GS Mode Selector: Development & Feedback" (http://www.psx-scene.com/forums/showthread.php?t=61808) thread on PSX-SCENE.

                              You are invited to visit, sign in, and join us!

                              BR,
                              Last edited by doctorxyz; 10-15-2009, 06:41:07 AM. Reason: Link fixed

                              Comment

                              Working...
                              X