Frozen-Home
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Frozen-Home

A Forum dedicated to Tribes, game hacks, and a few other things.
 
HomeGalleryLatest imagesSearchRegisterLog in

 

 Intro to Hex, and a Brainlord Savestate Guide

Go down 
AuthorMessage
Frozen-Dream
Sage/Hacker
Sage/Hacker
Frozen-Dream


Posts : 6
Join date : 2009-06-19
Age : 32

Intro to Hex, and a Brainlord Savestate Guide Empty
PostSubject: Intro to Hex, and a Brainlord Savestate Guide   Intro to Hex, and a Brainlord Savestate Guide I_icon_minitimeSat Jun 20, 2009 11:57 am

Well in this guide I will explain to you what Hex is, using an example (Brainlord Savestate Hacking).
What is savestate hacking?
You know when you save your game in an emulator, like Zsnes, you can save 'snapshots' or 'savestates'?
Savestate hacking is editing that save, so when you load it, you can have what you want!

Now, if understanding Hex seems intimidating, don't worry about it, try it yourself once you think you can. Even I, at one point thought all this was too much for me to understand.

Well lets start shall we?

Things You Will Need:

1. A Hex editor of your choice. Hex Workshop works miracles, but is a trial. HxD Hex Editor ranks up there with Hex Workshop, and is free, but doesn't have all the functions Hex Workshop does.

2. A file you want to edit (In this case, Brainlord).

3. Zsnes Emulator. Sorry Snex9 users, but the Savestates are different on the two. Read my "how to find items and stats and stuff" guide and it will teach you how to find stuff yourself.


Understanding Hex and What It Is:
Do me a favor? Make a text document. A plain text document. (a .txt)
Name it this, EXACTLY "OhCrap.txt".
And write this down EXACTLY in it. (without the quotes) "Oh shit my dog is dead!?"
Now open up your hex editor you recently downloaded...
Tell it to open your new text document...
When it opens, you will see on the right your text is there, and on the left there is... a crap load of numbers?
Every pair of those numbers is a byte. (the VERY start of the file should have a byte called '4F' )
That 4F is a byte.
"Wait why is there a F there?"
In hex, it is different then normal. Hex isn't 0123456789, it is 0123456789ABCDEF. F meaning 15. Sooo.... FF (The largest byte number) would be 255 in normal numbers.
Well now you know what a byte is, good for you. Now, these bytes control the file, game, whatever it is your looking at.
For the most part, if you change a byte you don't know what it is, you will more then likely fuck something up, even if it inst always visible.
Anyway.
That 4F you see...tells the .txt that there is a O there. (Capital sensitive)
Just like, if you notice, every space is a 20.
Sooo...
So far we should understand, 4F=O 20=Space 68=h 73=s etc etc etc.
The point I'm trying to make is all these numbers tell the file what is in the file.
HOWEVER, when working with games, it is normally very, very different. You see, your Hex editor is configured to be able to read normal computer language. (the language here is ANSI)
So, way back when, they NORMALLY didn't use the same byte configuration. (In other words, in a lot of games, 4F didn't mean O)
some games, like Ocarina of Time (Nintendo 64 Zelda game) however DID use the same text language.
Most just don't.
Anyway, bytes control what is what in a file. Some games or files don't just only use one byte to say what something is. sometimes they will use two or three.
Like I'm sure if you somehow opened a newer WII game with a hex editor, you would find 010502 would mean "a" or something. This is why it is sometimes hard to find text in a game..
Now, bytes control more then just text. If you hack Ocarina of Time, you would find that you can edit text easily, but after the text there is a byte that tells the game to end the text, to end the chat. to change the color of the text, Give a item, or anything!
The possibilities are endless, it all depends what the programmers did to the game.
Hex 'hacking' is when you change a byte to something else, normally of things in your inventory or something.

And just to clarify, a Offset is where exactly in the file you are.
Like, in the very start of the text file, you should be in 00000000, if you go down a line you should be at 00000010
The 'my' from "my dog' should be at offset 8 and 9. 8 being the m, 9 being the y.
both Hex Workshop and HxD have a nifty little "Goto offset" option. Normally found in the "Search" tabs.
Oh yeah! i almost forgot, if you want to find out what a 'normal number' is in hex, do this (assuming your on a Windows..)
Start > Programs > Accessories > Calculator
go up to the View tab, and click Scientific.
Now make sure you are set to Dec (Dec is the 'normal numbers' without the f's and stuff.
type in the number you want...Example, 100.
Now click on the Hex button, (next to the dec) and it will tell you that 100 in normal, is 64 in hex.
Mind you whenever you are hex editing numbers, ALWAYS put in the Hex version of the number unless otherwise posted.

I hope this helps you understand what hex is just a little bit.


Now onto hacking BrainLord.

Making A Savestate And Hacking It..

First of all, download Brainlord for the SNES if you haven't already. (Google is your friend, id give you a link if I could but its illegal, and i don't want my websites getting shut down. Just search in google "SNES Rom Downloads" you should find something right off the bat)
Play the game a bit..Get used to it, enjoy it if you want. Make a save state whenever you are ready.
The savestate should come out as "Nameofgame.Zst" And is found in the same directory as your Rom.
In my example, I save stated right when I helped the lady in the mansion/big house with the rat problem, and got the items from the chests in her house.
Here are your starter stats:

Money: 6000
HP, Max and Current: 6
Power: 2
Guard: 1
Current Inventory in order: Copper Sword, Scrap of Paper, Leather Armor, Leather Helm, Buckler.

Now we all know what you should have stats and stuff..
Well, now open up your Zst file in a hex editor (in case you didn't already) And look at this guide. Here
First of all, the guide will tell you what Hex does what, and what offsets are where..
If you understand Hex, you can just read this guide and purely know what to do.
at the very top of the guide, it tells you what hex is what text, but ignore this for now, they are only personal notes..
with the guide open, do a Ctrl+F (find) and search Money, only do it once.
You will find, that the money bytes (three bytes, 00, 00, 00) are at the offset (the location) 0F88, 0F89, and 0F8A.
So! go back to your hex editor, assuming you have Brainlord.zst open (you don't?! Oh dude i told ya to like 3-4 times now D< )
Go ahead and do a "Goto" on '0F88'
Once you are there, put these bytes in there. "FF FF FF"
Now save, whip open your emulator, load the state..
go though a door (to make it reload your money and stuff)
and you will find you have a crap load of money.
Now, lets see if we can do something just a step more confusing. (if your keeping up with me so far, good for you!)
go back to your save state hacking guide, scroll down a bit..
You can see that your inventory (item) offsets are all 1533, all the way though 1592
So go back to your hex editor AGAIN and do a goto on 1533.
Now, the very first two bytes you see SHOULD be 0101. (the copper sword)
Now, do ya want the best weapon on the game? change it to 0501. (Platinum Sword)
whip open your emulator and load, WALA.
Now, look at the guide, after stuffing what all i said into your puny little brain (i kid of course) you should be able to understand how to change items, stats, etc.

Now after reading all this, you SHOULD understand what HEx is, and how to savestate hack.
If you want a savestate hack guide for any game. google up. "Put-game-name-here savestate hacking guide"
If you cant find anything, post up here what you want! XP i wont mind making a guide myself.
You can do this to ANY program, game, file, ANYTHING.
Hex is where A LOT of not all game hackers start out there hacking ideas.
Just be careful and BACK UP WHATEVER IT IS YOUR GONNA HACK.
I'm serious, everyone does mistakes, even i make 3 backups a hour. (copy and paste your game somewhere then edit it)

any questions/comments? Feel free to ask in this thread, I'm willing to help out newbies.

-Edited by Yazviel-
--I started editing grammar and spelling and everything, but I got bored halfway through and just skimmed the rest for spelling errors. Screw capitalization and punctuation. <___<''
Back to top Go down
http://frozen-home.hoxt.me/Index.html
 
Intro to Hex, and a Brainlord Savestate Guide
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Frozen-Home :: Other Game (Roms/classics) :: Modding/Hacking-
Jump to: