Hacking PlayStation 2

From Wiki - GameHacking.org
Jump to: navigation, search
EnHacklopedia >> {{ #ifeq: Hacking PlayStation 2 | EnHacklopedia | Index | Hacking PlayStation 2 }}


Gameshark

Description

There are at least two major incompatible versions that exist for various reasons. The originals were sold by Interact Accessories until their bankruptcy and sale of the trademark to Mad Catz. Confuse the two at your discretion.

Code Types

This codes must be encrypted to work
Type Description
8-bit RAM write
0aaaaaaa 000000dd
Writes dd to address aaaaaaa.
16-bit RAM write
1aaaaaaa 0000dddd
Writes dddd to address aaaaaaa.
32-bit RAM write
2aaaaaaa dddddddd
Writes dddddddd to address aaaaaaa.
8-bit Increment
301000nn aaaaaaaa
Increments the byte stored at address aaaaaaaa by nn.
8-bit Decrement
302000nn aaaaaaaa
Decrements the byte stored at address aaaaaaaa by nn.
16-bit Increment
3030nnnn aaaaaaaa
Increments the halfword stored at address aaaaaaaa by nnnn.
16-bit Decrement
3040nnnn aaaaaaaa
Decrements the halfword stored at address aaaaaaaa by nnnn.
32-bit Increment
30500000 aaaaaaaa
nnnnnnnn 00000000
Increments the word stored at address aaaaaaaa by nnnnnnnn.
32-bit Decrement
30600000 aaaaaaaa
nnnnnnnn 00000000
Decrements the word stored at address aaaaaaaa by nnnnnnnn.
16-bit If Equal To
Daaaaaaa 0000dddd
The next code is executed only if the halfword at address aaaaaaa is equal to dddd.
16-bit If Not Equal To
Daaaaaaa 0010dddd
The next code is executed only if the halfword at address aaaaaaa is not equal to dddd.
16-bit If Less Than
Daaaaaaa 0020dddd
The next code is executed only if the halfword at address aaaaaaa is less than dddd.
16-bit If Greater Than
Daaaaaaa 0030dddd
The next code is executed only if the halfword at address aaaaaaa is greater than dddd.
16-bit If Equal To: Multi-line Skip
Ennndddd 0aaaaaaa
Executes the next nnn codes only if the halfword at address aaaaaaa is equal to dddd.
16-bit If Not Equal To: Multi-line Skip
Ennndddd 1aaaaaaa
Executes the next nnn codes only if the halfword at address aaaaaaa is not equal to dddd.
16-bit If Less Than: Multi-line Skip
Ennndddd 2aaaaaaa
Executes the next nnn codes only if the halfword at address aaaaaaa is less than dddd.
16-bit If Greater Than: Multi-line Skip
Ennndddd 3aaaaaaa
Executes the next nnn codes only if the halfword at address aaaaaaa is greater than dddd.
Copy Bytes
5aaaaaaa nnnnnnnn
bbbbbbbb 00000000
Copies nnnnnnnn bytes from address aaaaaaa to bbbbbbbb. GS 2.0+ only.
Slide Code
4aaaaaaa xxxxyyyy
dddddddd 00000000
Writes the word dddddddd to xxxx addresses starting with aaaaaaa, incrementing the address by yyyy * 4.
Deadface
DEADFACE xxxxxxxx
Changes encryption seeds.

Encrypt/Decrypt

Action Replay

Description

Code Types

Encryption/Decryption

Codebreaker

Description

Code Types

Encryption/Decryption

Playstation 2 AR Max

AR Max

Description

Code Types

Encryption/Decryption

Joypad Values

PS2 games can use any one of four different value systems for storing button presses depending on the game. The only way to determine which system is used is to hack the joypad reader itself.

Normal

These are the values used in the GS D4, D5, and D6 code types. Combine buttons by using bitwise OR.

Button Value
Select 0x0001
L3 0x0002
R3 0x0004
Start 0x0008
Up 0x0010
Right 0x0020
Down 0x0040
Left 0x0080
L2 0x0100
R2 0x0200
L1 0x0400
R1 0x0800
Triangle 0x1000
Circle 0x2000
X 0x4000
O 0x8000

Reverse

This alternative button storage method had its values combined using bitwise OR. These values are determined by byteswapping the normal values.

Button Value
L2 0x0001
R2 0x0002
L1 0x0004
R1 0x0008
Triangle 0x0010
Circle 0x0020
X 0x0040
Square 0x0080
Select 0x0100
L3 0x0200
R3 0x0400
Start 0x0800
Up 0x1000
Right 0x2000
Down 0x4000
Left 0x8000

Max Normal

These values are determined by subtracting the Normal joypad values from 0xFFFF. Buttons are combined with bitwise AND.

Button Value
Select 0xFFFE
L3 0xFFFD
R3 0xFFFB
Start 0xFFF7
Up 0xFFEF
Right 0xFFDF
Down 0xFFBF
Left 0xFF7F
L2 0xFEFF
R2 0xFDFF
L1 0xFBFF
R1 0xF7FF
Triangle 0xEFFF
O 0xDFFF
X 0xBFFF
Square 0x7FFF

Max Reverse

These values are determined by subtracting the Reverse values from 0xFFFF.

Button Value
L2 0xFFFE
R2 0xFFFD
L1 0xFFFB
R1 0xFFF7
Triangle 0xFFEF
Circle 0xFFDF
X 0xFFBF
Square 0xFF7F
Select 0xFEFF
L3 0xFDFF
R3 0xFBFF
Start 0xF7FF
Up 0xEFFF
Right 0xDFFF
Down 0xBFFF
Left 0x7FFF


EnHacklopedia
Basics
Number and Data Encoding Formats - Generic Code Hacking
Individual Systems In Depth
Hacking Arcade - Hacking NES - Hacking SMS - Hacking SNES - Hacking Genesis - Hacking Saturn - Hacking PSX - Hacking N64 - Hacking DC - Hacking PS2 - Hacking GCN - Hacking Game Boy - Hacking Game Gear - Hacking Game Boy Advance - Hacking NDS -
Documents and References
Documents
Tools
Tools


Legal

Creative commons.png
All files (HTML, CSS, images) included in EnHacklopedia are licensed under the Creative Commons Attribution-ShareAlike 3.0 License. All authors contributing to EnHacklopedia should be made aware of the license before contributing. If the author does not agree to the licensing, his or her contributions will not be accepted into the project.