Announcement

Collapse
No announcement yet.

CL-LiveDebug v4 Beta

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CL-LiveDebug v4 Beta

    Source code available on my Github. SVN seems to be down.

    UPDATE: 6/16/13: Added as an attachment. Revision 387.
    Code:
    Updates:
    6/13/13: 4.1.1 Unofficial
    - Added ability to change the joker combo to enter the debugger
    - Added a found jokers list at the main menu of the debugger
    - Added ver option to the preset joker list. If you do not enter one it will not check for the number
    
    
    4/02/13: 4.1.0 Beta
    - Added dynamic allocation for both the register dumper and the packet
    - Removed Gtlcpimp's exception handler
    - Added ability to add preset joker from the GUI
    - Added a keyboard to the GUI
    - Added ability to set boot path to uLE from the GUI
    - When booting SifLoadElf is attempted before trying to load and boot the elf itself
    This is really just another update to my LDv3 modifications. However this one is quite big and has been added to the Artemis SVN (http://gamehacking.org/artemis/svn). The debugger itself has had no updates, but instead a completely new GUI based upon Berion's GUI for Artemis. Many thanks to Berion for creating the initial functions relating to the GUI. I would like feedback on the GUI because I feel like it is incomplete.

    Moving away from the GUI, there are a few new features to take note of:

    Upon boot, you have the option to automatically load a joker address based on the elf specified in the SYSTEM.CNF file within the disc. This is to counter the game freezing Joker Scanner. Format example in CL-LiveDebug.conf (uLDv4.rar). If you do not add a ver #, make sure that you add a , "" after the joker address. Otherwise it will not work.

    The option to launch uLaunchELF (Press start). It goes off the locations mc0:/BOOT/BOOT.ELF, mc1:/BOOT/BOOT.ELF, mass:/BOOT/BOOT.ELF. With this you have the option (if auto find joker on boot is 'Yes') to either load the joker based on the elf in the disc or to not auto find a joker at all.

    The joker combo is the button combo that opens the debugger in game. By default it is L3 + R3, but you have the ability to change it to what you wish.

    Lastly there is a built in array that is called only if it cannot find a joker for the appropriate game. This was designed to minimize the amount of jokers you need in your text file. If you would like me to add to the joker array please reply with the game's elf and the joker address (within CODE tags) and (optional) the version # of the game. Example:
    Code:
    SCUS_974.65 001EE682 1.00
    SLUS_211.94 0084305C
    That would look like this in the conf file:
    "SCUS_974.65", "001EE682", "1.00"
    "SLUS_211.94", "0084305C", ""

    When booting an elf, there are some colors that will flash on the screen.
    Code:
    Execution debug colors:
    
    ORANGE: SifLoadElf
    RED: Opening elf
    GREEN: Reading elf
    BLUE: Loading elf into EE RAM
    YELLOW: Launching game/elf with ExecPS2()
    PURPLE: Invalid elf entrypoint, launching uLE
    PINK: uLE not found/failed to load, launching OSDSYS
    WHITE: Failed to launch OSDSYS (should never happen)
    Misc:
    Code:
    Upon boot of uLDv4, it will check for a settings file at mc0:/LiveDebug/CL-LiveDebug.conf.
    If there is none, it will create one with default settings.
    Both CL-LiveDebug.conf and LDPatches.txt need to be placed in that same folder.
    Here are images of the the Unofficial CL-LiveDebug v4:
    Spoiler Alert! Click to view...




    Debugger originally made by Gtlcpimp. GUI originally made by Berion. Many thanks to bungholio for beta testing and SP193 for providing help.

    f you wish to compile this you need libpng, zlib, and gsKit.

    And here are the downloads. Source is on the svn: http://gamehacking.org/artemis/svn
    Attached Files
    Last edited by dnawrkshp; 09-24-2016, 02:47:35 PM.

  • #2
    Thanks, I am one of those people who prefer to search/hack this way instead of using LAN.

    Comment


    • #3
      Yeah just hold on a bit :P. I ran into an error and I am in the middle of fixing it.

      EDIT: Fixed.
      Last edited by dnawrkshp; 03-10-2013, 11:49:57 PM.

      Comment


      • #4
        The only way i can get a PS2 to PC connection is through PS2 client loader, with uLE, OPL will NOT work no matter how hard i try, thanks for updating this, The original creator seems to have abandoned it.

        Comment


        • #5
          I really need to get around to checking this out. It sounds like a dream come true

          Thanks for working on/posting this.
          I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

          Comment


          • #6
            I agree.

            Comment


            • #7
              At least someone is building onto the device, hate to release the only working proof of concept for in game screen printing and it go to waste...

              Any who, LiveDebug was never perfect as it was not the only thing under development when it was created. It was designed under Code Designer, and updated as Code Designer got updated as well. So obviously LDv3 is not as optimal as it could have been which is why it had so many bugs with it. An imcomplete IDE can only create an incomplete program. However with the most latest version of CodeDesigner v2.3, it is much easier to develop a larger project like LDv3. Granted, it still is not the best, but is much better than what was still available at the time of LDv3's development.

              Since you are actively working on updating your modification to LDv3, I'll leave you a small insignificant gift that may ease your way if you choose to utilize the functions. I wrote a small sort of classes to make MIPS development much easier for writing sub routines for games and even to update LDv3. However I receive zero income from the PS2 hacking scene, so I pretty much have left it entirely making these classes sit here and rot.

              Small summery of the class files:

              //================================================== ========== Kernel.cds
              // Disable Interrupt
              DI:

              // Enable Interrupt
              EI:

              // Enter User Kernel Mode
              ee_kmode_enter:

              // Exit User Kernel Mode
              ee_kmode_exit:

              //================================================== ========== Math_Convert.cds
              // Byte to BIN - Creates binary string from the byte
              ByteToBIN:

              // BIN To Byte - Converts binary string back to the byte value
              BINToByte:

              //================================================== ========== Pixel 2.0.cds
              // Vertical Sync
              vSync:

              // Get current display settings
              _GetDisplay:

              // Restore display settings
              _RestoreDisplay:

              // GS_SET_DISPLAY(632, 50, 3, 0, 2559, 447)
              _SetDisplay:

              // Initialize screen for drawing
              _initScreen:

              // Set Display Buffer
              _SetDisplayBuffer:

              // Set Draw Buffer
              _SetDrawBuffer:

              // Set Z Buffer
              _SetZBuffer:

              // Clear GS Buffer
              _ClearBuffer:

              // AddPixel
              _AddPixel:

              // DMA Channel 2 Upload (Send GIF Packet)
              _DMA_2_Upload:

              // Wait Channel Ready
              _WaitDMAChannelReady:

              // void SyncDCache(void *start, void *end)
              _SyncDCache:

              // void _opDCache(void *start, void *end)
              _opDCache:

              //================================================== ========== Stack.cds
              // Trace the stack from current point
              _StackTrace:

              //================================================== ========== String.cds
              // UCase() -> Converts to Upper Case
              UCase:

              // LCase() -> Converts to Lower Case
              LCase:

              // Split(); (splits a string into an array of strings by the delimiter)
              SplitStringArray:

              // Chunk Compare (compare if chunks are equal instead of just a string)
              ChunkCompare:

              // Data Columns (creates columns for displaying string data, useful if you have a use like I did)
              _BuildColumnData:

              // String Print Format (My favorite part of this class!)
              sprintf:

              // 32 bit hex value to string -> instead of sending a memory address you use the value of the register itself
              Hex32ValToStr:

              // Reverse String (useful for dealing with hexadecimal strings being viewed in reversed order)
              ReverseStr:

              // String To Hex-String (converts raw data to hexadecimal string value)
              StrToHex:

              // Concat Strings
              StrConcat:

              // String Compare (compare if 2 strings are equal)
              StrCompare:

              // Copy string (can be used to inject 1 string inside the other at a specific point)
              StrCopy:

              // Clear string data (all 0x00)
              StrClear:

              // Strlen(); -> returns the length of the string
              StrLen:

              // strVal(); -> returns the value of a string
              StrDecVal:

              // Hex value to decimal string
              HexToStrDec:

              // Non-String Imported Functions
              PowerOf:

              //================================================== ========== TinyFont.cds
              /*
              This class is entirely designed for on-the-fly debug printing. It includes
              embeded compressed font and will decompress for you at will.
              */
              // Decompress Font Character
              FontChar_Decompress:

              If these classes benefit you, then awesome. Even if you do not use them directly you can still continue to learn from them. Congrats on successfully making your own mod for the device, just try not to call it an "official LDv3 update" since it is actually your own modifications that you are creating.

              The classes are in the attachment. Also it comes with a pre-built exception display screen (blue screen of death) that may or may not be useful. It has only been tested on 1 game so it might need a bit of modification and might not!

              Enjoy.
              Attached Files

              Comment


              • #8
                Wow, never thought you'd return, cool.

                Comment


                • #9
                  So I can call this the unofficial CL-LiveDebug v4 Beta? Just verifying before I get myself into an issue.

                  I have a question, do you have any idea how to set the screens dimensions when the debugger launches? I know it has to do with the SetGsCrt syscall, DISPLAY1 register, and DISPLAY2 register. I am currently debugging it by moving the hook to 0x800001A0 and changing the jr $k0 to j 0x8007F000. Then changing the _init in the LDHook.cds to handle everything as a jump and not a jal. I am going to try and force the arguments (interlace and mode) to be what I want and then let it continue. There are a few games (Jak 1 in particular) that have a zoom effect on the menus.

                  Do you have a better idea? I am not very experienced in this GS stuff.

                  Comment


                  • #10
                    Calling it "Unofficial" works fine, but do take credit for the work that you do!

                    From Pixel 2.0.cds
                    Code:
                    //==========================================================
                    _GetDisplay:
                    
                    lui a0, $1200
                    
                    ld v0, $0080(a0) // Get Display 1
                    ld v1, $00A0(a0) // Get Display 2
                    
                    jr ra
                    nop
                    //==========================================================
                    _RestoreDisplay:
                    
                    lui v0, $1200
                    
                    sd a0, $0080(v0) // Get Display 1
                    sd a1, $00A0(v0) // Get Display 2
                    
                    jr ra
                    nop
                    
                    //==========================================================
                    // GS_SET_DISPLAY(632, 50, 3, 0, 2559,  447)
                    // 0x12000080 = GS_REG_DISPLAY1
                    // 0x120000A0 = GS_REG_DISPLAY2
                    // 01832278 001BF9FF
                    _SetDisplay:
                    
                    lui a0, $1200
                    
                    lui v0, $001B
                    ori v0, v0, $F9FF
                    dsll32 v0, v0, 0
                    lui v1, $0183
                    ori v1, v1, $2278
                    daddu v0, v0, v1
                    sd v0, $0080(a0)   // Set Display 1
                    sd v0, $00A0(a0)   // Set Display 2
                    
                    jr ra
                    nop
                    Use the "_GetDisplay" method to retrieve current screen resolution, "_SetDisplay" to apply our resolution, and "_RestoreDisplay" to restore it back to what you retrieved at first. This solved the problem for me on a few test games, give it a shot.

                    @47iscool - I am not active on the ps2 hacking scene anymore but do drop by from time to time to see how you guys are doing.

                    Comment


                    • #11
                      Cool. It worked, but not on Jak 1. Actually, the game freezes as soon as you leave the debugger. So the width and height aren't really the main issue.

                      Comment


                      • #12
                        NFS Carbon for PS2 has lots of glitches on-screen when R3+L3 is pressed the game freezes, Also does the program have access to the IOP? Just to let you know GTA San Andreas has the zoom-in if activated in the loading screens, but it works perfect in-game, In my opinion, This has got to be the best app for PS2, The reason i asked about IOP is, I can't seem to find anything for Sonic Mega Collection Plus ,I also set the search range from 00100000 to 00F00000, Some games like GTA require me to set a higher search range, If I start the search range at 00000000, the app will lock up,Nonetheless now I can hopefully start submitting some PS2 codes,All the best.
                        Last edited by 47iscool; 03-12-2013, 12:30:21 AM.

                        Comment


                        • #13
                          The debugger itself doesn't touch the IOP; but you can view it in the memory browser and search within it.

                          The EE memory ranges from 0x00080000 to 0x02000000. But games usually don't start below 0x00100000. If you don't search within valid virtual memory ranges, the debugger will freeze. I haven't added a catch to it yet. For finding codes for games, you only need to search within 0x00100000 and 0x02000000.
                          Last edited by dnawrkshp; 03-12-2013, 12:43:37 AM.

                          Comment


                          • #14
                            Okay I will do that.
                            Last edited by 47iscool; 03-12-2013, 01:54:32 AM.

                            Comment


                            • #15
                              Thanks for the info, Thanks to Gtlcpimp for creating it & thanks to you working on it I think we will see a lot more PS2 codes being made.
                              Last edited by 47iscool; 03-12-2013, 01:21:42 AM.

                              Comment

                              Working...
                              X