HEX Add 2 to this code?

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
So here is the GameShark code in question:
80086E8X 000F

The X stands for the player being modified. It can be used to set every player to Character "0F" in the last four.

So, here is what I've done and confirmed it works.
80086E84 000F - Player 1 Becomes Character
80086E86 000F - Player 2 Becomes Character
80086E88 000F - Player 3 Becomes Character

And now here is where I am lost.
6,8,0F, 11, Just add two in hex for the next player value.

Okay, great! Now how the hell do I replace one "X" with two characters?
I took this code:
80086E8X 000F and erased the 8 before the XX, so it read as follows:
80086EXX 000F
From there I added 0F, which is player 4, respectively.
80086E0F 000F - Player 4 SHOULD Become Character right? NOPE! That "8" before the X makes or breaks the code.

So I came here to ask, HOW THE HELL AM I SUPPOSED TO REPRESENT 0F in ONE SLOT!?

Thanks!
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
Hexadecimal numbers always consist of two characters, so it's more like:

80 08 6E XX 00 0F

Which translates to decimal:

128 8 110 XX 0 15

Now, 84 (hex) = 132 (dec), 86 (hex) = 134 (dec), 88 (hex) = 136 (dec), so the jumps are regular. I think you can take it from here relatively easily. ;)

EDIT: I would assume that the next in line would be 8A, which converts to 138 decimal. It makes sense and fits the pattern, that should be player four.
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
Where does the certainty that 0F refers to player 4 come from? Why would the game suddenly break the memory pattern used for the three other players?

Again, guys:

84 hex = (4*16^0) + (8*16^1) = (4*1) + (8*16) = 4 + 128 = 132
86 hex = (6*16^0) + (8*16^1) = (6*1) + (8*16) = 6 + 128 = 134
88 hex = (8*16^0) + (8*16^1) = (8*1) + (8*16) = 8 + 128 = 136
8A hex = (10*16^0) + (8*16^1) = (10*1) + (8*16) = 10 + 128 = 138

hex/dec:

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
 

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
Where does the certainty that 0F refers to player 4 come from? Why would the game suddenly break the memory pattern used for the three other players?

Again, guys:

84 hex = (4*16^0) + (8*16^1) = (4*1) + (8*16) = 4 + 128 = 132
86 hex = (6*16^0) + (8*16^1) = (6*1) + (8*16) = 6 + 128 = 134
88 hex = (8*16^0) + (8*16^1) = (8*1) + (8*16) = 8 + 128 = 136
8A hex = (10*16^0) + (8*16^1) = (10*1) + (8*16) = 10 + 128 = 138

hex/dec:

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15


There is 8 players total.
I guess I am way off.
F refers to no one.
A refers to player four. Unless F is player 8 because the cycle starts again...
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
There is 8 players total.
I guess I am way off.
F refers to no one.
A refers to player four. Unless F is player 8 because the cycle starts again...
If there's 8 players total then the math should be simple from this point:

Player 1 = 84 (132)
Player 2 = 86 (134)
Player 3 = 88 (136)
Player 4 = 8A (138)
Player 5 = 8C (140)
Player 6 = 8E (142)
Player 7 = 90 (144)
Player 8 = 92 (146)

Does that help/work?

Edit: Added the missing player, well-spotted jonthedit. ;)
 

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
If there's 8 players total then the math should be simple from this point:

Player 1 = 84 (132)
Player 2 = 86 (134)
Player 3 = 88 (136)
Player 4 = 8A (138)
Player 6 = 8C (140)
Player 7 = 8E (142)
Player 8 = 90 (144)

Does that help/work?

The 90 breaks it.
The 8 seems to be part of the code and not actually related to the character. :|
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
The 90 breaks it.
The 8 seems to be part of the code and not actually related to the character. :|
That should't be the case, again, hexadecimal numbers come in pairs. I take it that players from 1 to 7 work fine? Why not try 82 (130)? It's sort of ass-backwards, but you never know. It would be easier to tinker with this if we knew the game you're working on and your tools.
 

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
Herp-a-derp, my bad, you're absolutely right, corrected in the post above.

Figured it out. Thanks for the help! Thank you Team Fail and Foxi4!

To elaborate, the Hexadecimal conversion Foxi4 explained made sense to me. (I probably should have refreshed my memory on Hex :P)
The problem was not the "90". Foxi4 was correct, and I was wrong. The game accepted the code however the multiple instances of the code running with separate targets caused issues.
So I created a tool that injected the codes at different times.
Ironically after making this tool, I found [pec] which solves this issue by itself. Either way, I did this without [pec].

I'm glad that we could help! So, what was your final result? I'm just curious if this was a regular gap of 2 or if it went funky for player 7 and player 8.
Regular gap of 2! I made a mistake as explained above.
 
  • Like
Reactions: Foxi4

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,825
Trophies
3
Location
Gaming Grotto
XP
29,843
Country
Poland
I'm glad that we could help! So, what was your final result? I'm just curious if this was a regular gap of 2 or if it went funky for player 7 and player 8. - Snip! Didn't notice the edit above. :P

EDIT: Good to hear that everything worked out in the end, good luck with whatever you're modifying! ;)
 

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
I'm glad that we could help! So, what was your final result? I'm just curious if this was a regular gap of 2 or if it went funky for player 7 and player 8. - Snip! Didn't notice the edit above. :P

EDIT: Good to hear that everything worked out in the end, good luck with whatever you're modifying! ;)
Sorry for the delay! Glad you saw my edit!
Here is my first experiment that ended in success using what we just discussed! I hope to reverse engineer this game at some point, and getting involved with GS is a start for me! I need to see what can be done without source tampering!
The video is now fully processed. HD :P!
 
  • Like
Reactions: Foxi4

jonthedit

Well-Known Member
OP
Member
Joined
May 30, 2011
Messages
1,682
Trophies
0
XP
1,010
Country
Bangladesh
Crash Team Racing? Good man, looks like fun! :)

CTR is an old PSOne classic. I love the game! I actually find it more fun than Mario Kart even though it is a clone of MK.
I just bought it again on my family's PS3 when it went on sale for 99cents! Already 101%'d it lol.
Thought I would have some fun tampering with it on an emulator.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.