News: 11 March 2016 - Forum Rules

Author Topic: [HELP] Finding which values to edit in a hex editor?  (Read 4221 times)

rafaelinio

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
[HELP] Finding which values to edit in a hex editor?
« on: April 09, 2016, 12:08:33 pm »
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
« Last Edit: April 09, 2016, 12:25:43 pm by rafaelinio »

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #1 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 am the lord, you all know my name, now. I got it all: cash, money, and fame.

rafaelinio

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #2 on: April 09, 2016, 01:10:51 pm »
oh, that's just it? Thanks :D

RyanfaeScotland

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • My Brill Game Site
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #3 on: April 09, 2016, 02:01:08 pm »
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

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #4 on: April 09, 2016, 02:20:07 pm »
i guess my preferred console would be gameboy advance

dougeff

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #5 on: April 09, 2016, 03:40:54 pm »
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

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #6 on: April 10, 2016, 04:15:52 am »
omg thanks man, this is perfect!! :D Also, how long would something like this take? Is it too complicated?

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #7 on: April 10, 2016, 04:44:25 am »
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

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #8 on: April 10, 2016, 04:58:21 am »
hahahaha alright thanks xD

RyanfaeScotland

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • My Brill Game Site
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #9 on: April 10, 2016, 07:19:29 am »
Start with more lives btw if you want the easy one to begin with.

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #10 on: April 10, 2016, 07:30:31 am »
Without even the rom? 30 years.
And that's how the SNES PlayStation was made. :beer:
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

rafaelinio

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #11 on: April 10, 2016, 08:38:25 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

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #12 on: April 10, 2016, 02:06:27 pm »
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

  • Sr. Member
  • ****
  • Posts: 317
  • Corruptomancer
    • View Profile
    • Stuff Jigglysaint has done(like discover the Crocomire in MZM)
Re: [HELP] Finding which values to edit in a hex editor?
« Reply #13 on: April 11, 2016, 08:20:07 am »
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.