Forum: Cheat Code Hacking - General discussion of various cheat devices for the PS2 (AR/GS, CodeBreaker, Xploder, etc.) and code hacking.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: Questions on code condensing
  

Results 1 to 9 of 9
  1. #1 Questions on code condensing 
    Alv2 Guest
    I'm using the example on Codemasters project.

    003FBF73 00000003
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003
    003FBF77 00000003
    003FBF78 00000003
    003FBF79 00000003
    003FBF7A 00000003
    003FBF7B 00000003
    003FBF7C 00000003
    003FBF7D 00000003
    003FBF7E 00000003
    003FBF7F 00000003
    003FBF80 00000003
    003FBF81 00000003
    003FBF82 00000003
    003FBF83 00000003
    003FBF84 00000003
    003FBF85 00000003
    003FBF86 00000003

    would be condensed into

    003FBF73 00000003
    403FBF74 00050001
    03030303 00000000

    My question is how did 0005 (xxxx) come about, do I still count it as 20 lines or 19 since the condensed version is actually short of one line due to the 0,4,8,C restriction.

    I would get 0005 if I take 20/4 but 19/4 would give me 0004 instead.

    What about the 0001 (ZZZZ), according to the guide, I need to divide the step value by 4, for the code above, the step value is 1 and 1/4 = 0.

    Thanks in advance.
    Reply With Quote  

  2. #2  
    Vampmaster Guest
    This:

    003FBF73 00000003
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003

    Is the same as this:

    203FBF73 03030303

    And 5 lines like that would be like 20 of the the first four. I wasn't sure if you were using MAX commands, but it's the same type of thing.
    Reply With Quote  

  3. #3  
    Alv2 Guest
    Vampmaster, I'm still trying to get a grip on how to perform code condensing using 32 byte condensing.

    I'm not using MAX commands, just the normal raw/hex. I'm trying to learn to condense code just by looking at them since they kinda need to follow a predetermined pattern with fixed step value.

    Thanks in advance.
    Reply With Quote  

  4. #4  
    Pyriel is offline Member
    Join Date
    Mar 2003
    Posts
    122
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    This:

    003FBF73 00000003
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003

    Is the same as this:

    203FBF73 03030303
    < - No, this isn't properly aligned.

    Alv is correct, based on what he's posted. If there were one more line to the code (003FBF87 00000003), the condensed version posted would be correct. As it is, it should be:

    003FBF73 00000003
    403FBF74 00040001
    03030303 00000000
    103FBF84 00000303
    003FBF86 00000003

    The step value is based on the write width of the type 4 code (32-bits). It must always be >= 1, so you can't condense a set of codes that way unless they can be safely done with 32-bit writes.
    Reply With Quote  

  5. #5  
    GMO's Avatar
    GMO
    GMO is offline GMO?®©
    Join Date
    Nov 2002
    Location
    Chicago,IL
    Posts
    1,388
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    1
    003fbf73 00000003
    003fbf74 00000003
    003fbf75 00000003
    003fbf76 00000003

    003fbf73 00000003
    203fbf74 00030303
    I love Jennifer Gatbunton!
    PS2 & GBA Code Hacking For Dummies
    My Offical Codebreaker Codes
    My Codebreaker Game Saves
    Reply With Quote  

  6. #6  
    Alv2 Guest
    Hmmm... does that mean the 0,4,8,C restriction also applies to 16 byte and 32 byte condesing at well since Pyriel mentioned that the code 203FBF73 03030303 isn't aligned properly?

    Thanks in advance.
    Reply With Quote  

  7. #7  
    Vampmaster Guest
    Quote Originally Posted by Pyriel
    This:

    003FBF73 00000003
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003

    Is the same as this:

    203FBF73 03030303
    < - No, this isn't properly aligned.
    Wasn't thinking. I meant to say this:

    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003
    003FBF77 00000003

    Is the same as this:

    203FBF74 03030303

    And 5 lines like that would be like 20 of the the first four. I was trying to explain to Alv2 why 5 is used instead of 20.
    Reply With Quote  

  8. #8  
    Pyriel is offline Member
    Join Date
    Mar 2003
    Posts
    122
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Quote Originally Posted by GMO
    003fbf73 00000003
    003fbf74 00000003
    003fbf75 00000003
    003fbf76 00000003

    003fbf73 00000003
    203fbf74 00030303
    Yeah, but that assumes that it's safe to overlay the byte at 0x3FBF77 with 0, which may not be true.

    It's based on code type, Alv2. If the code writes/reads 32 bits (a full-word), then the address must conform to word alignment and word aligned addresses end in 0, 4, 8 or C. If the code writes/reads 16 bits (half-word), then it must conform to half-word alignment. Those are addresses ending in 0, 2, 4, 6, 8, A, C or E. The 8-bit write has no address restrictions.

    When you're condensing, you have to look at the source codes and make sure that they can be made to conform to the rules of the target code types.

    Here are a few examples:

    1 -
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003
    003FBF77 00000003


    Four codes, each writing 8 bits; the addresses are sequential and the first code in the list has an address that conforms to word alignment. The condensed code could be:

    203FBF74 03030303

    -------------------------

    2 -
    003FBF73 00000003
    003FBF74 00000003
    003FBF75 00000003
    003FBF76 00000003


    Four codes, each writing 8 bits; the addresses are sequential however the first code in the list does not have an address that conforms to word alignment. The condensed code could be:

    003FBF73 00000003
    103FBF74 00000303
    003FBF76 00000003


    The only lines that could be safely condensed were the lines ending in 4 and 5. 4 conforms to half-word alignment, so the two lines were made into a 16-bit write. 4 also conforms to word alignment, but the three 8-bit writes (the line in question and the two following it) weren't enough to fill a 32-bit write (2 command). Although, as GMO sort of mentioned, you could use the 32-bit command anyway and condense the last line as well:

    003FBF73 00000003
    203FBF74 00030303


    If the extra data being written is used for something, the code may have unwanted effects.

    --------------------------------

    3 -
    003FBF76 00000003
    003FBF77 00000003
    003FBF78 00000003
    003FBF79 00000003


    Four codes, each writing 8 bits; the addresses are sequential however the first code in the list does not have an address that conforms to word alignment. It does conform to half-word alignment though, as does the third line. The condensed code could be:

    103FBF76 00000303
    103FBF78 00000303


    --------------------------------

    4 -
    003FBF76 00000003
    003FBF77 00000003
    003FBF80 00000003
    003FBF81 00000003


    Same as number three, however there's a jump in the addresses after the second line. Still, there are two pairs of sequential lines and the first of each starts on a half-word aligned address. This could be condensed like so:

    103FBF76 00000303
    103FBF80 00000303


    --------------------------------

    5 -
    003FBF76 00000003
    003FBF88 00000003
    003FBF9C 00000003
    003FBFAF 00000003


    Four lines, each writing 8 bits. None of the addresses are in sequence though. This cannot be safely condensed at all, even though some of the addresses conform to alignment.
    Reply With Quote  

  9. #9  
    Alv2 Guest
    Thanks a lot Pyriel, the examples you've provided really explain a lot. It'll be a real nice addition to the code condensing guide at codemasters project.
    Reply With Quote  

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •