Announcement

Collapse
No announcement yet.

attempt to permanently patch an psx iso with a gameshark code

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

  • attempt to permanently patch an psx iso with a gameshark code

    Hi , after reading this : http://gamehacking.org/vb/threads/82...SM-codes/page2

    i have done this : i used deamon tools in order to extract the SLUS_xxx.xx file , i found the addresses , in this case 242EC and
    242EE ( it's the invulnerability code for chrash bandicoot 1 ntsc version : 800242EC 0004 800242EE 2403) , and then i put 0004 and 2403 ( i used the hexadecimal heditor HxD ) , after that i used CDmage 1.02.1 Beta 5 in order to drug and drop the SLUS_xxx.xx file in the iso.


    For some reasons , the invulnerability code didn't worked at all , also , the game now crash when i try to jump , what's exactly my mistake ? What i am supposed to do in order to make this procedure to work ?
    Last edited by tizzio1; 01-07-2017, 04:34:19 PM.

  • #2
    Did you convert the gameshark code to raw code first or did you not revert it at all?

    Comment


    • #3
      Originally posted by Gtlcpimp View Post
      Did you convert the gameshark code to raw code first or did you not revert it at all?
      no , i didn't converter the gameshark code to the raw format , so can you tell me the name of the application to convert gameshark codes to the raw format ? also , what else i have done wrong ?
      Last edited by tizzio1; 01-07-2017, 03:42:38 PM.

      Comment


      • #4
        I'm not familiar with GameShark so I'm taking a shot in the dark when I ask the question. If you have a .ISO from the game cd and you have the raw code you want to permanently write, the process is rather simple. Open the slus file with a disassembler tool (for the ps2 we use ps2dis), navigate to the address for the code so you can grab the original data. Copy the original data (the more bytes the better), open the slus file with an actual binary file editor tool (such as Hex Workshop) and search for the data you just copied. once you have found it you are now able to overwrite it with the data you want (from your code). Save the file and inject it back into the .ISO file (I use WIN Image personally). You should be able to burn the .ISO back onto a new CD and it will be ready

        Comment


        • #5
          Originally posted by Gtlcpimp View Post
          I'm not familiar with GameShark so I'm taking a shot in the dark when I ask the question. If you have a .ISO from the game cd and you have the raw code you want to permanently write, the process is rather simple. Open the slus file with a disassembler tool (for the ps2 we use ps2dis), navigate to the address for the code so you can grab the original data. Copy the original data (the more bytes the better), open the slus file with an actual binary file editor tool (such as Hex Workshop) and search for the data you just copied. once you have found it you are now able to overwrite it with the data you want (from your code). Save the file and inject it back into the .ISO file (I use WIN Image personally). You should be able to burn the .ISO back onto a new CD and it will be ready
          ok got it , now i only need to know if i can inject beck the modded file without ruin the iso using CDmage since i am playing on an emulator
          Last edited by tizzio1; 01-07-2017, 04:26:08 PM.

          Comment


          • #6
            If you some how ruin the image then rip a new .iso, always keep your original game disc

            Comment


            • #7
              Originally posted by Gtlcpimp View Post
              If you some how ruin the image then rip a new .iso, always keep your original game disc
              yes but what program i can use to convert the codes to the raw format ? as for the disassembler tool i can't use ps2 dis because i am trying to mod a psx game
              Last edited by tizzio1; 01-07-2017, 04:53:43 PM.

              Comment


              • #8
                There's no such thing as encryption on PS1 codes. One of the later, CD-based devices might have incorporated it, but by that time virtually every code that was going to exist had been created and posted in raw/unencrypted form, and nobody was going to replace all that with bullcrap encrypted versions. That code is already "raw".

                It's easier to not even rebuild the ISO. Just open up the disassembly, find the instructions, and then grab a sequence of 16 bytes or so that includes it, open the disc image in a hex editor, and do a find on that string of bytes. As long as you don't grab a string of 0x00 or 0xFF or something like that, 16 bytes is usually enough to get a unique hit, even in something as big as an ISO.

                On the off chance that you're just going into the file and looking for the offset 242EC, that's not going to work. These are structured files, and a lot of it is given over to header information that tells the PSX where to put things in memory. Simply put, the memory address will almost certainly not line up with the offset into the file. In order to permanently embed a code like this, you either have to parse the headers and figure out what goes where in memory so you can find the right offset, or use the search method Gtlcpimp and I are describing. The search method is usually easier.

                Also bear in mind that the PS1 is little-endian. So when you find whatever value was there, it's going to look backwards, and the series of bytes you enter will be "04 00 03 24", and not "24 03 00 04" or "00 04 24 03".

                You can absolutely use PS2Dis. The PS2's CPU is a later generation in the same family that the PS1's processor came from. And PS2Dis was designed to handle both readily. The only possible issue is that sometimes the disassembler will see data as code, and show you PS2-only instructions.

                Edit: Another thing you can do is use this: http://www.romhacking.net/utilities/635/

                You'd have to generate a file something like this, and run the utility, then rebuild the ISO somehow. I wouldn't advise this unless you plan to do a lot of patching and rebuilding.

                Code:
                .psx
                .align 4
                
                .openfile SLUS_xxxx.xx, %Ram offset%
                
                .org 0x800242EC
                	addiu $v1, 0, 4 ; or .word 0x24030004
                	
                .close
                The %RAM Offset% parameter is for some reason the difference between where the first byte of code loads and the header size. I guess the author didn't want to make the directive behave differently from one architecture to another, so he foisted that bit of work onto the user. In any case, if memory serves, you can just go to offset 0x18 in the executable/SLUS and then subtract 0x800 from the value there.
                Last edited by Pyriel; 01-13-2017, 01:55:42 PM.

                Comment

                Working...
                X