[HELP] Finding which values to edit in a hex editor?

Started by rafaelinio, April 09, 2016, 12:08:33 PM

Previous topic - Next topic

rafaelinio

Hey guys,
I just started rom hacking today, so sorry for the newb question but:
how would i go about finding the right value to edit in a hex editor for let's say making the character jump higher, or more lives?
Working with hexadecimal isn't really a problem since i used to do a bit of cracking, but it's REALLY different from rom hacking xD
Can you please explain how you would go on about finding the right byte to edit for what you are trying to accomplish? Thanks.

April 09, 2016, 12:25:43 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Just realised wrong section :/. Can a mod move it please? thanks

Gemini

You use a debugger  to track down the right bytes, that's really all. Unless you're planning to corrupt random data and see what happens, but that's not exactly the best and fastest approach.

rafaelinio


RyanfaeScotland

Hey rafaelinio, check out the docs section on the site, there is quite a few that deal with this. What's your prefered game / console? General principles are normally the same but is easier to give advice if we know at least that.

rafaelinio

i guess my preferred console would be gameboy advance

dougeff

rafaelinio,

If I were going to edit the jump height of the main character, (I don't know if this exists for GBA), I would view the RAM while playing, try to locate which byte is for the Y coordinate. Do this by jumping around, while looking at RAM bytes. Confirm it by typing in a value, and see if Y position changed. From that, work backwards to find the RAM for Y velocity.

Now, set a breakpoint for 'writes' to that RAM address. Work backwords in the code. Specifically, what you want is the first write from when you go from stationery to a new jump. The game will be subtracting a constant from Y to start the jump. You would be modifying this constant to change jump height.

Likely, there will also be a 'while walking' and 'while running' jump velocity.

This is the kind of investigation that makes ROM hacking fun. It's like a little puzzle.
nesdoug.com -- blog/tutorial on programming for the NES

rafaelinio

omg thanks man, this is perfect!! :D Also, how long would something like this take? Is it too complicated?

henke37

With detailed knowledge about the game? five minutes. With the original source code? 15 minutes. With an annotated disassembly? 30 minutes? With just the final rom? 3 hours. Without even the rom? 30 years.

rafaelinio


RyanfaeScotland

Start with more lives btw if you want the easy one to begin with.

Gemini


rafaelinio

Quote from: RyanfaeScotland on April 10, 2016, 07:19:29 AM
Start with more lives btw if you want the easy one to begin with.
thanks for the tip :D this will be the first thing i try with super mario bros. on the NES. Can't be that hard, right?

Rotwang

Little things like that are pretty easy, but the real way to learn is to discover things on your own.

Get yourself into the mindset that you don't need a special license to do any of this stuff, get your hands dirty and play around with values and don't be afraid to break things as long as you back up your work. Experiment, experiment, experiment. With ROM hacking you learn by doing and observing.

Jigglysaint

Quote from: Gemini on April 09, 2016, 12:54:03 PM
You use a debugger  to track down the right bytes, that's really all. Unless you're planning to corrupt random data and see what happens, but that's not exactly the best and fastest approach.

I beg to differ.  Well maybe not that great for finding ASM routines, but if you are looking for data, rom corruption can be lightning fast if you have an idea of what values you want to look for.  Works best for finding level data.