How to power hack game savestates: with EDX and Python Programming
Hello!
PSX gaming made up a large part of my childhood; so, hooray! - when I got my hands on an emulator for the PC. My favourite part, of course, was the hacking. Then, it was GameShark - now, it's hacking game savestates. Hahaha! Much better, much faster!
How To Power-Hack savestates
We'll do this with two tools. The first is a Hex Editor. It's called EDX. A search on google should bring you to its latest version.
Next, I'll be using Python, an easy-to-apply programming language, to mass-edit the save state.
Catch the gist, yet? Sure that, if you did some programming before, you'd be on to it pretty quickly.
Step 1: Searching numbers
OK, this is the basic way everyone uses EDX. Lots of guides online on how to do this. Search "hack savestates with EDX psx" or whatever and you'll get overkill.
Very simple:
1. Open file in EDX
2. Use EDX search function to look for a number
3. Edit the Hex values
Use Microsoft's in-built calculator to convert Hex values if you're on Windows. It's convenient.
Step 2: Get GameShark codes for the game
Right! This shall be pretty much step one of the power-process. You can use GameShark on ePSX, I think. If you're satisfied with just that, this would actually be your first and last step. No need for EDX even!
If you'd ever used GS before, you'd know just how long it takes to input every code that ever exists. Fortunately, Someone has created a cool tool for this. It has inbuilt GS codes. Simply install it as a plugin to ePSX. Can't remember the name. Cheat Code...something. Just search "GameShark plugin for ePSX" or "using GameShark on psx emulators". That should get you what you need.
Yup, ends here if that's all you want, and the Cheat Code plugin works for you. Never used it myself though. And not using ePSX. So if you're like me, or you're not just hacking PSX games on ePSX - Welcome to Power-Hacking!
Final Fantasy: The Power Hacker
Drum roll! Yes! Forget the heading. Hackers need to concentrate.
Checklist:
1. have a list of gameshark codes
2. have EDX
3. have Python
And you're ready!
1. open savestate in EDX.
2. look for a simple one - money is easy. Remember the position e.g. 4050130(d). You can remember it as Hex, but I prefer integers, for the sake of consistency with Python later on. PS: toggle numbering on EDX by clicking the top left tab marked "offset (h)" until it's "offset(d)".
in-depth:
Let's say you have 31156 money. Search "31156", integer number. It's usually integers; an example of floating point would be Capitalism game saves - I hacked the cash holdings of the company.
Now, on the left you'll see a row of numbers. Remember the position, like coordinates. say, "466101,05". It's easier on the eye, than the raw number. (466101 + 05 = 466106)
* the numbers are the bytes in the file. For when using f.seek(), etc.
3. NOW! Compare it with its GameShark counterpart. Do they match? Most likely not. But they tend to be in sync with each other. Convert the first part of the GS code to (d), and find the difference between the byte addresses. e.g.
GS max money: 80071A5C FFFF
EDX search: 466101
Use python:
int("80071A5C",16).
-> 2147949148
d = 2147949148 - 466101
And now you have the relative position of all codes : d!
You can use another code, say
GS max lumber: 80070D38 03E7
you'll now be able to find the position in the EDX file by using
int("80070D38",16) - d
Right! I assume you get the gist of the process now. Just convert all GS codes. And...
Python Power!
No more inputing GS coded line by line!
Python has a powerful tool for Hex files editing. It's called the mmap module.
Just use something like:
#<Python Code>
import mmap
from binascii import unhexlify
with open(savestate,'r+b') as f:
mm = mmap.mmap(f.fileno(),0) #always start with this
m.seek(466101) #byte number
m.write(unhexlify("7f9698"))
mm.close() #always end with this
#<End>
Can't explain the whole Python process here. It's a whole other story.
Hope you get the gist though. If you get the programming, I'm sure you can figure out how to power-up the process. Those Python skills come handy after all!
Important Note!: Place the Hex values in the opposite order. Say you want 9,999,999 money, as above, use 7f9698 instead of the correct 98967f. Yes, everything's backwards, in pairs. Use the Microsoft calculator. Very useful.
PSX gaming made up a large part of my childhood; so, hooray! - when I got my hands on an emulator for the PC. My favourite part, of course, was the hacking. Then, it was GameShark - now, it's hacking game savestates. Hahaha! Much better, much faster!
How To Power-Hack savestates
We'll do this with two tools. The first is a Hex Editor. It's called EDX. A search on google should bring you to its latest version.
Next, I'll be using Python, an easy-to-apply programming language, to mass-edit the save state.
Catch the gist, yet? Sure that, if you did some programming before, you'd be on to it pretty quickly.
Step 1: Searching numbers
OK, this is the basic way everyone uses EDX. Lots of guides online on how to do this. Search "hack savestates with EDX psx" or whatever and you'll get overkill.
Very simple:
1. Open file in EDX
2. Use EDX search function to look for a number
3. Edit the Hex values
Use Microsoft's in-built calculator to convert Hex values if you're on Windows. It's convenient.
Step 2: Get GameShark codes for the game
Right! This shall be pretty much step one of the power-process. You can use GameShark on ePSX, I think. If you're satisfied with just that, this would actually be your first and last step. No need for EDX even!
If you'd ever used GS before, you'd know just how long it takes to input every code that ever exists. Fortunately, Someone has created a cool tool for this. It has inbuilt GS codes. Simply install it as a plugin to ePSX. Can't remember the name. Cheat Code...something. Just search "GameShark plugin for ePSX" or "using GameShark on psx emulators". That should get you what you need.
Yup, ends here if that's all you want, and the Cheat Code plugin works for you. Never used it myself though. And not using ePSX. So if you're like me, or you're not just hacking PSX games on ePSX - Welcome to Power-Hacking!
Final Fantasy: The Power Hacker
Drum roll! Yes! Forget the heading. Hackers need to concentrate.
Checklist:
1. have a list of gameshark codes
2. have EDX
3. have Python
And you're ready!
1. open savestate in EDX.
2. look for a simple one - money is easy. Remember the position e.g. 4050130(d). You can remember it as Hex, but I prefer integers, for the sake of consistency with Python later on. PS: toggle numbering on EDX by clicking the top left tab marked "offset (h)" until it's "offset(d)".
in-depth:
Let's say you have 31156 money. Search "31156", integer number. It's usually integers; an example of floating point would be Capitalism game saves - I hacked the cash holdings of the company.
Now, on the left you'll see a row of numbers. Remember the position, like coordinates. say, "466101,05". It's easier on the eye, than the raw number. (466101 + 05 = 466106)
* the numbers are the bytes in the file. For when using f.seek(), etc.
3. NOW! Compare it with its GameShark counterpart. Do they match? Most likely not. But they tend to be in sync with each other. Convert the first part of the GS code to (d), and find the difference between the byte addresses. e.g.
GS max money: 80071A5C FFFF
EDX search: 466101
Use python:
int("80071A5C",16).
-> 2147949148
d = 2147949148 - 466101
And now you have the relative position of all codes : d!
You can use another code, say
GS max lumber: 80070D38 03E7
you'll now be able to find the position in the EDX file by using
int("80070D38",16) - d
Right! I assume you get the gist of the process now. Just convert all GS codes. And...
Python Power!
No more inputing GS coded line by line!
Python has a powerful tool for Hex files editing. It's called the mmap module.
Just use something like:
#<Python Code>
import mmap
from binascii import unhexlify
with open(savestate,'r+b') as f:
mm = mmap.mmap(f.fileno(),0) #always start with this
m.seek(466101) #byte number
m.write(unhexlify("7f9698"))
mm.close() #always end with this
#<End>
Can't explain the whole Python process here. It's a whole other story.
Hope you get the gist though. If you get the programming, I'm sure you can figure out how to power-up the process. Those Python skills come handy after all!
Important Note!: Place the Hex values in the opposite order. Say you want 9,999,999 money, as above, use 7f9698 instead of the correct 98967f. Yes, everything's backwards, in pairs. Use the Microsoft calculator. Very useful.
Comments
Post a Comment