Announcement

Collapse
No announcement yet.

CheatDevicePS2

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

  • #76
    Thanks for posting the source. For a "static hook" are you referring to a location that's consistent among all kernel versions? Maybe modify the exception handler to jump to the code engine after certain exceptions?

    Comment


    • #77
      Kernel Memory address 0x800002FC, is the Jump and Link instruction for all positive system calls. Hook from that address, preserve all registers as long as you return to the system call it intended to execute. This is a statically assigned function among every kernel version for the PS2.

      Comment


      • #78
        Thanks root670!

        Comment


        • #79
          the access to usb device needs to be delayed, because the app doesnt wait for the being ready to be accessible and throw at me that the cheat data base couldnt be found. BTW, Great app! Congrats, we love it!
          PlayStation® 2 System: SCPH-90010 50001 39001 - SCE Modem/Ethernet
          OPL WIP - MGO1 is BACK!

          Comment


          • #80
            No longer compiles

            I've got the latest PS2SDK and Linux Mint 17.3 x64 installed. Cloned your repo from Git and it doesn't compile for me.

            Code:
            In file included from util.c:3:
            graphics.h:10:19: gsKit.h: No such file or directory
            graphics.h:11:19: dmaKit.: No such file or directory
            graphics.h:12:23: gsToolkit.h: No such file or directory
            util.c: In function `rtrim':
            util.c:426: warning: implicit declaration of function `strlen'
            make: *** [util.o] Error 1
            bat@mint ~/CheatDevicePS2 $

            Comment


            • #81
              Here's another test release that no longer requires enable codes, using a static hook instead. If a game's first cheat is an enable code, it will be ignored unless it uses additional codes lines other than a '9' or 'F' hook (Metal Gear Solid 3 and the Jak games do this, for example). I'm not 100% sure if these are necessary to be enabled if a static hook is used, but they're being kept for compatibility. The '9' or 'F' hook won't be used in this case, just the extra lines.

              I've tested this with a few games and it seems to work fine, but I'd appreciate feedback if anyone has a chance to test it out. Thanks.
              Attached Files

              Comment


              • #82
                Generally, it's a safe bet they need to be on. Usually, they're just conveniently located bits of code required for other codes to work, but not always.

                The one Jak game with a longer enable code is overriding protection, or remedying some issue the cheat engine causes. I'm not sure which. Depending on where the engine is stored for this device, coupled with the universal hook, you may have gotten around the issue without needing the code, assuming the game is just examining likely changes a cheat device would make in order to inflict itself on the game. However, with the Metal Gear game, most of that master code was CMX re-purposing the C code type as some sort of custom-built, shorthand pointer-write. It'll be necessary for his codes to work, but at the same time useless on this cheat device unless your main cheat loop is identical or close to. Of course, that's a problem for converting those codes to anything, including other versions of the CodeBreaker, so it's hardly a shortcoming for you to worry about.

                Edit: The AR Max enable code for MGS3 is a bunch of checksum/verifier cruft that's only useful to the AR MAX (guessing this is a multi-disc game?), and the MadCatz enable code is just a setup for a routine that's required for other codes.
                Last edited by Pyriel; 06-17-2016, 12:33:26 PM.

                Comment


                • #83
                  hook the kernel might cause problems

                  Pro
                  * no master code need (auto hook the kernel)
                  (Misfire's PS2rd already does this and can be disable for compatibly issues)

                  Con
                  * user RAM and Video corruptions (can't flush out)
                  * slowdowns
                  * multi-elf games might not load
                  * would have to substitute all 9 type to C type to make multi-elf games to load


                  F type master code has two types
                  -the entrypoint type is already static
                  -the active JAL in main elf

                  pro
                  *all elf have entrypoint

                  con
                  *multi-elf games might not load and codes might not work on the secondry elf
                  *need find master code in each elf (active JAL in main elf)


                  8 and 9 type master code is conditional type
                  pro
                  *multi-elf games will load and codes will work on the secondry elf

                  con
                  *need find master code in each elf
                  (http://gamehacking.org/vb/threads/91...e-Finder-(PS2))


                  MGS2 and MGS3 codes are cheat devices specify because the CB subroutine alters the functions of cheat engine

                  mostly the codes under master codes are usually just subroutine
                  Last edited by lee4; 06-19-2016, 02:14:32 PM.
                  lee4 Does Not Accept Codes Requests !
                  When lee4 asks a question it does not mean lee4 will look at your game
                  *How to create and use SegaCD codes >click here<*
                  >)

                  Comment


                  • #84
                    Good points you've brought up. I guess the best solution is to allow enable codes (9 or F type) to be used, in which case the kernel hook wouldn't be used. If an enable code isn't enabled, then use the static hook. The static hook could also cause issues if a game is loaded through OPL, ESR, etc. since the codes would be active from the start. I'm back in school now and won't have much time to work on this, but it's something I'd like to work on if I had the time!

                    Comment


                    • #85
                      Bad news. This does indeed break USB loader support.

                      Apparently it's hooking opl because the the opl screen has has a green tint and the games fail to boot.

                      How about an option to disable/enable auto-hook?

                      It should work fine for direct booting a game from disc but not anything else except maybe emulators.
                      Last edited by 47iscool; 06-24-2016, 07:07:20 PM.

                      Comment


                      • #86
                        I haven't really thought this through all the way, but instead of ignoring 9-type codes, couldn't they just be treated as C-type? You might still have the possibility of slowdowns, but the other issues should mostly disappear if nothing below the 9-type is executed until its condition is true.

                        Edit: It might still be worthwhile to allow kernel-hooking to be disabled in favor of the standard game hooks. I'm just thinking if you make it a boot-up option, and handle 9- and F-type codes differently based on an option, rather than their mere presence in the code list, you give the user some choice in the matter, while possibly allowing the same code list to work in either mode.
                        Last edited by Pyriel; 06-24-2016, 11:17:35 PM.

                        Comment


                        • #87
                          If an enable code is being used, I don't see a reason to use the static hook with the code converted to a C-type. It'll only cause additional issues as far as I can see; an ideal hook address has already been found so we should just use that.

                          My current plan is to create an option in the settings file to use the static hook if an enable code isn't being used. A message will be displayed when the static hook is used so the user can pinpoint it as a potential cause of issues if crashing occurs. Enable codes won't be hidden from the cheat list either way. I might also add an option to skip execution of codes within a set interval (only execute the codes every N times the engine is called) to prevent slowdowns with the static hook. NetCheat does something similar to that with it's B-type code.

                          Hook Options:
                          1. 9-type Enable Code without Static Hook
                          The safest option. Won't interfere with loader ELFs and works with multi-ELF games.
                          2. Static Hook without 9-type Enable Code
                          Can cause issues with loader ELFs but allows codes to be used when an enable code is unavailable.
                          3. No Static Hook nor 9-type Enable Code
                          Warn user that cheats will be disabled.

                          Originally posted by Pyriel View Post
                          The one Jak game with a longer enable code is overriding protection, or remedying some issue the cheat engine causes.
                          Fwiw, Jak II does require the additional parts of the enable code to prevent hanging at the license screen. I assume the others in the series require this too. Makes me wonder if they were deliberately trying to thwart people from using cheats or if something in the game's engine was interfering with the code engine.

                          Comment


                          • #88
                            Originally posted by root670 View Post
                            If an enable code is being used, I don't see a reason to use the static hook with the code converted to a C-type. It'll only cause additional issues as far as I can see; an ideal hook address has already been found so we should just use that.
                            C type acts like universal joker for enable all codes on or off
                            which 9 type also does when value matches or not

                            EX.
                            90101FE4 0C60F809 --- if value 0C60F809 is at 00101FE4 address codes will be enable, and if value 0C60F809 is NOT at 00101FE4 address codes will be disable
                            and
                            F0100008 0000000E --- (static) hook on entrypoint all codes will be enable at once
                            C0101FE4 0C60F809 --- by adding c type to the mixed if value 0C60F809 is at 00101FE4 address ALL codes will be enable and vice versa


                            Originally posted by root670 View Post
                            My current plan is to create an option in the settings file to use the static hook if an enable code isn't being used. A message will be displayed when the static hook is used so the user can pinpoint it as a potential cause of issues if crashing occurs. Enable codes won't be hidden from the cheat list either way. I might also add an option to skip execution of codes within a set interval (only execute the codes every N times the engine is called) to prevent slowdowns with the static hook. NetCheat does something similar to that with it's B-type code.
                            slowdowns is cause by hook in kernel, hook is lockdown

                            trying change the speed execution of codes might introduce glitches (similar to psp)

                            this why datel (actionreplay) and cmx (codebreaker) did not use kernel hook

                            hooking to game elf cheat engine runs at game speed

                            Originally posted by root670 View Post
                            Fwiw, Jak II does require the additional parts of the enable code to prevent hanging at the license screen. I assume the others in the series require this too. Makes me wonder if they were deliberately trying to thwart people from using cheats or if something in the game's engine was interfering with the code engine.
                            no, its made to stop piracy

                            both modchip and cheat devices use kernel
                            which triggers anti-piracy shit
                            Last edited by lee4; 06-26-2016, 02:10:04 PM.
                            lee4 Does Not Accept Codes Requests !
                            When lee4 asks a question it does not mean lee4 will look at your game
                            *How to create and use SegaCD codes >click here<*
                            >)

                            Comment


                            • #89
                              Originally posted by lee4 View Post
                              C type acts like universal joker for enable all codes on or off
                              which 9 type also does when value matches or not

                              EX.
                              90101FE4 0C60F809 --- if value 0C60F809 is at 00101FE4 address codes will be enable, and if value 0C60F809 is NOT at 00101FE4 address codes will be disable
                              and
                              F0100008 0000000E --- (static) hook on entrypoint all codes will be enable at once
                              C0101FE4 0C60F809 --- by adding c type to the mixed if value 0C60F809 is at 00101FE4 address ALL codes will be enable and vice versa



                              slowdowns is cause by hook in kernel, hook is lockdown

                              trying change the speed execution of codes might introduce glitches (similar to psp)

                              this why datel (actionreplay) and cmx (codebreaker) did not use kernel hook

                              hooking to game elf cheat engine runs at game speed
                              Yeah, this is what I was getting at. I can't really think of a good reason for putting a 9-type handler in the main engine, and processing it like a C-type, but nor can I think of a good reason not to, aside from possible user error. Theoretically, it gives you the ability to have the main cheat engine executing through the kernel hook, while cheats aren't running, but I don't know of a case where this would actually be an advantage. And anyone exploiting that behavior with codes could just as easily utilize a C-type for the same effect, and instruct users that they must use the kernel hook.

                              Comment


                              • #90
                                Originally posted by lee4 View Post
                                Pro
                                * no master code need (auto hook the kernel)
                                (Misfire's PS2rd already does this and can be disable for compatibly issues)

                                Con
                                * user RAM and Video corruptions (can't flush out)
                                * slowdowns
                                * multi-elf games might not load
                                * would have to substitute all 9 type to C type to make multi-elf games to load
                                I've never had any issues hooking from kernel. Multi-elf games run better from it. If you experience frame rate lag, fix the engine.

                                Comment

                                Working...
                                X