Jump to content
  • 0

How would one make a Gameshark Code for Debug Rom, etc?


Armos
 Share

Question

Hey, I was wondering how would one make a gameshark code for the Debug Rom, Majora's Mask, etc. I've tried looking for tutorials but there seem not to be any out there. Would anyone care to give an example? Or some information? Thanks. ^_^

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Guest sakura

Okay well, the first thing you need to know is how gameshark codes work. They're broken up in to three parts: the first byte (two digits) is the type of code, then the address in memory to change, and then the value to change it to. For example:

 

Infinite health:

8115E690 0140

 

81: the type of gameshark code. The two you'll see most often are 80 (for replacing one byte) and 81 (for replacing two bytes)

15E690: the address in memory to overwrite with your value

0140: the value you're writing to that address.

 

So for infinite health, that code continually overwrites the address in memory with 0140, which will give you a constant 20 hearts worth of health (due to how Ocarina of Time uses that value, each 0x10 is another full heart, so 0x140 / 0x10 = 0x14 = 20 hearts)

 

Now how do you find an address or value? The best way to start, is using a code search. I personally use Renegade 1.7 which has the ability to attach to an emulator and perform a code search. For an example, say you wanted to make a code for infinite slingshot ammo. You'd start Ocarina of Time, get to a point where you can see your current slingshot ammo, and attach Renegade or open up whatever you're using that allows you to search for codes. Then you put in your current amount of ammo, search, and it will list all the memory addresses that have the same value as the amount of ammo you have. The way you narrow it down, is by using some ammo and searching again with your new amount. Eventually you'll get one or two values, and that's the address you're looking for. Some times you get one value for the actual amount of ammo, and another value that the game uses to display your current amount of ammo, and you have to test both to find which one is the one you need. Say you ended up with 8011A64C though as your address. To always have 99 slingshot ammo, the code would simply be 8011A64C 0063. It's an 80 type code to write one byte, which always writes 0x63 (99) to the address 0011A64C in memory, which is the address the game uses as your current amount of slignshot ammo.

 

Sorry if it's a poor explanation, it was kind of quickly written. Please feel free to ask questions about it, and I'll expand on anything that's not understood.

Link to comment
Share on other sites

  • 0

+1 on this. I use Cheat Engine though. Keep in mind that not all values are what you think they are. Many times values are not stored as the displayed integer. You see this more on the PS2 (PCSX2) GameCube (Dolphin), but something to be aware of.

 

In those cases you will need to do more of an Increasing or decreasing search as the value changes in game.

Link to comment
Share on other sites

  • 0

If your looking for something about you are unsure of how to find it for example lets say rupees amount. You can use a Less than Greater than search.

 

Basically if you have 100 rupees its hex value is 64. There for you look for a Known value you 0064. You than walk around until you find a rupee, and now have 101 which is 0065. You can than do a search for Greater than your previous search. The amount of search results will be less, which is good because your narrowing the search. Now go spend some rupees, and do a search for less than your previous search. It will narrow down your results until you get a quantity of search results you can work with like 20.

 

From there you can poke your results to find out which will change the amount of rupees you have on hand.

 

I use Renegade 64 or Galatea to perform my searches. Cheat Engine is another good tool to do this.

 

Once you find the address that changes the amount of rupees in your inventory (not just the display on the screen) you can write a code for it. If you are editing Two bytes you are going to use an 81XXXXXX and a one bit will be 80XXXXXX. X's representing the ram location of the value you want to edit.

 

So for example 80150000 0064 would keep the bit at 00150000 at the value 64. While on the other hand 81150000 0064 would make the bit at 00150000 the value 00 and the value at 00150001 64.

 

Using a D code will give you activators. So for example the code:

 

D0160000 0010

80150000 0064

 

Will store the value 64 at offset 00150000 when the value in 00160000 is equal to 0010.

 

Gameshark codes can be fun and tricky some times but it is a very useful tool that can do some really cool things if you learn how to use it to your advantage.

 

Hope this helps.

 

DL

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.