ROM Hack Creating Gateshark codes using Citra!

Shadow LAG

Well-Known Member
OP
Member
Joined
May 10, 2013
Messages
256
Trophies
1
Age
33
XP
568
Country
United States
Things you will need:
* Citra build with Gateshark cheat support
(Currently Citra Bleeding Edge 150 at the time of writing this)
*Cheat Engine: http://www.cheatengine.org/aboutce.php
*Basic knowledge of creating codes

Step 1: (Preparation)
Find a pre-made Gateshark code for the game you wish make codes for (THE SIMPLER THE BETTER).
For this example I will be using the INF Rupees code for Majoras Mask 3DS (US) Version 1.0. 10775318 000003E7

Step 2: (Interfacing cheat engine with Citra)
Load up Citra and start your game (MM3DS in this case) prior to loading up cheat engine.
Next, go to the cheat engine window and select open and select the citra process

Step 3: (Starting a code search)
You will need to use cheat engine to find the code that controls your value. In this example I will be using the bank in MM3D to Add and Subtract Rupees.
I start off with 12 rupees and set cheat engine to "Exact Value" "2 Bytes" --make sure hex value is unchecked. I then input the number 12 and click "First Scan". This should generate a huge list of codes on the left side of the screen.

Step 4: (Defining a code search)
I then either deposit / withdraw rupees using the bank to change the value. After I change the value in cheat engine to match the new value in game. I deposited 6 rupees, leaving my rupees at 6 (since we originally had 12). This means I need to change the number in cheat engine from 12 to the new value which is now "6". Now I click "Next Scan" which should now reduce the number of codes in the list on the left side of the cheat engine window.

Step 5. (Refining a code search)
Lastly, I repeat the above process by going in game, changing my rupee count, changing the search for the number of rupees I have in game, and continuing to "Next Scan" until we are left with just a couple of entries in the code list.

Step 6. (Completing a code search)
Right click the codes generated by Cheat engine (in the list on the left). Select the option to "Add selected addresses to the address list". Now your code result(s) should be added to the bottom list. Double click on the value (this will be the number of rupees you have) and change it to 99. If your Rupees now show 99, congratulations you found the code we are looking for. If you do not see a change, continue to try changing the value to 99 on the other codes in the list (if there are any). You may now remove any other codes we added to the address list as we have found the code we are looking for.

Step 7. (Finding Gateshark code address)
Now we open up notepad and type the address that is now our Citra memory address for rupees. We then take our 3DS Gateshark address and change the first number in the address to "0".
Example:
Gateshark Code:
10775318 000003E7
We just need the address so we remove the second part:
10775318
Now we change the first number of the address to zero
00775318
The reason we do this is because the first number just tells gateshark how to handle the code. Since we remove the gateshark instruction, we now have our 3DS memory address for rupees.

Step 8. (Finding Citra memory difference)
Now that we have our Citra memory address for rupees, and the 3DS memory address for rupees, we will need to convert any other codes we find in cheatengine to gateshark codes so other people can use them. In order to do that, we need to find the difference between the address.
We need to use a hex calculator to find that difference. This is the one I use which is web based and does not require you to download anything:
www.calculator.net/hex-calculator.html

We now subtract the 3DS address from the Citra address like so:
NOTE: THE CITRA ADDRESS CHANGES EVERYTIME YOU RE-OPEN CITRA SO MY CITRA ADDRESS WILL NOT MATCH YOURS

Finding Citra base Address
//[Rupees]
Citra Address: 280EB358
//minus
3ds Address: 00775318
//equals
27976040
//Citra Memory Difference
(3ds Address) + 27976040

Step 9. (Converting Gateshark codes to Citra Address codes)
We now test the Citra memory difference by using another gateshark code. In this example, I am using fairy sword on B button for Majoras Mask 3DS. We simply use the Citra Memory difference equation above to convert our gateshark code to citra.

Test
//[B button: Fairy Sword]
3DS code: 2077532A 0000004F
//Remove Gateshark definition
0077532A 0000004F
//Remove Values
3ds Address: 0077532A
//Citra Memory Difference
(0077532A) + 27976040
//New Address
Citra Address: 280EB36A

We now click "add address manually" in cheat engine to add the Citra Address. Cheat engine will have you enter in the address. The address we enter will be the Citra Address we just found. In the next fields you will have the option to name the code, and select the number of bytes. We will name the code: B Button: Fairy sword. Next we will use the first number of the original gateshark code to determine the number of bytes.
0 = 4 bytes
1 = 2 bytes
2 = byte

Since our original gateshark code begins with 2, we will select byte
(2077532A 0000004F)

Our final product should look like this:
Address: 280EB36A
Description: B Button: Fairy sword
Type: Byte

Finally click "OK"
The code should now appear in the bottom list of cheat engine. Right click the code we just added and select "Show as hexadecimal". Next, click the check box next to the code to activate it. Now change the value to 4F and return to the game. If we did everything correct, we should now pull out the Fairy sword when we press B.
Congratulations! We tested our first ported code.

Step 10. (Finding & Porting Citra Address codes to Gateshark codes)
This step requires you to use the tools in cheat engine to find your own code. If you need help with using the tools, there are plenty of tutorials online. For this example I will be using a brand new code I have found for MM3D.
I wanted to find a code to allow items to be used anywhere / anytime that are normally locked in certain situations. For example, in Zelda Majoras Mask, you cannot use the fierce deity mask unless you are in a boss fight. This code enables you to use it anywhere.

I remember in the N64 version that when an item was locked from use, the value would change to FF. This made finding the code extremely easy as I had experience with this code and the 3DS version is mostly the same. Since I know the usable items generate a value of 00, this makes my life a whole lot easier when searching.

I go in game and place a usable item on X button and run a first scan in cheat engine for the exact value (with hex checkbox checked) of 00. I then spam the next scan button until the code results on the left stop decreasing (or slows down). I then replace the item on the X button with an unusable one (Fierce Deity mask) before going into cheat engine and changing the value to FF. I then spam the next scan button until the value stops decreasing (or slows down).

I repeat the above process until I am left with two code results in the list to the left:
280FE95A
280FE958

I add both of these results to the bottom address list in cheat engine. I then right click one of them and select "browse memory region". Now when I set the memory viewer window next to the citra window, I can see values change from 00 to FF as I assign the unusable item (Fierce Deity's Mask) to each button one by one.

I can see a total of 4 bytes change from 00 to FF depending on the button. This makes sense as each button represents a byte. I then close out of the memory viewer and head back to the main window of cheat engine to define my address type. I double click on the byte type displayed after both of my addresses to change the bytes to 4.

I now enable the codes by checking the boxes next to them and changing the value to 00000000

Essentially our Citra Address code should look like this:
280FE95A 00000000
280FE958 00000000

I have now verified that when I press one of the buttons with an item that is unusable, I can use it. This means the code I found worked. We simply need to do the inverse of step 9 and subtract the citra memory difference from these codes using the hex calculator.

(280FE95A) - 27976040 = 78891A
(280FE958) - 27976040 = 788918

This leaves us with addresses that are two short. We must make them equal 8 characters long. We do this by adding zeros to the front which keeps the address the same, but also makes the addresses the correct length:

0078891A
00788918

Now we just need to replace the first number of each address with the gateshark instructions:

0 = 4 bytes
1 = 2 bytes
2 = byte

Since we are writing to 8 bytes we leave the first number of both addresses as "0"
We now have our Gateshark Addresses:

0078891A
00788918

We now add the values we modified from cheat engine after the Gateshark Addresses

0078891A 00000000
00788918 00000000

Lastly, we disable the codes in cheat engine and add/enable the Gateshark code we just made in Citra. If all goes well you should now see your code active using just the cheats function in Citra. Congratulations you just created a Gateshark code!

Footnote
I know this looks like quite a bit of work to do, but I assure you once you've done it once or twice it becomes a cake walk. I plan on uploading a video soon of this process. Please feel free to ask if you need anything clarified.
 
Last edited by Shadow LAG,

Gow supremo

I am playing my 2ds
Member
Joined
Jan 24, 2016
Messages
240
Trophies
0
Location
In the earth
XP
284
Country
Spain
I have create yokai watch 2 codes and found but the objets only found when have a x1 min.
How to create a code with add a item and edit a 99 items?
Example a code generated and found on 3ds:
[Souls Secrets]
086F8C28 00000063
 

Klairm

Member
Newcomer
Joined
Feb 28, 2017
Messages
16
Trophies
0
Age
28
XP
127
Country
Things you will need:
* Citra build with Gateshark cheat support
(Currently Citra Bleeding Edge 150 at the time of writing this)
*Cheat Engine: http://www.cheatengine.org/aboutce.php
*Basic knowledge of creating codes

Step 1: (Preparation)
Find a pre-made Gateshark code for the game you wish make codes for (THE SIMPLER THE BETTER).
For this example I will be using the INF Rupees code for Majoras Mask 3DS (US) Version 1.0. 10775318 000003E7

Step 2: (Interfacing cheat engine with Citra)
Load up Citra and start your game (MM3DS in this case) prior to loading up cheat engine.
Next, go to the cheat engine window and select open and select the citra process

Step 3: (Starting a code search)
You will need to use cheat engine to find the code that controls your value. In this example I will be using the bank in MM3D to Add and Subtract Rupees.
I start off with 12 rupees and set cheat engine to "Exact Value" "2 Bytes" --make sure hex value is unchecked. I then input the number 12 and click "First Scan". This should generate a huge list of codes on the left side of the screen.

Step 4: (Defining a code search)
I then either deposit / withdraw rupees using the bank to change the value. After I change the value in cheat engine to match the new value in game. I deposited 6 rupees, leaving my rupees at 6 (since we originally had 12). This means I need to change the number in cheat engine from 12 to the new value which is now "6". Now I click "Next Scan" which should now reduce the number of codes in the list on the left side of the cheat engine window.

Step 5. (Refining a code search)
Lastly, I repeat the above process by going in game, changing my rupee count, changing the search for the number of rupees I have in game, and continuing to "Next Scan" until we are left with just a couple of entries in the code list.

Step 6. (Completing a code search)
Right click the codes generated by Cheat engine (in the list on the left). Select the option to "Add selected addresses to the address list". Now your code result(s) should be added to the bottom list. Double click on the value (this will be the number of rupees you have) and change it to 99. If your Rupees now show 99, congratulations you found the code we are looking for. If you do not see a change, continue to try changing the value to 99 on the other codes in the list (if there are any). You may now remove any other codes we added to the address list as we have found the code we are looking for.

Step 7. (Finding Gateshark code address)
Now we open up notepad and type the address that is now our Citra memory address for rupees. We then take our 3DS Gateshark address and change the first number in the address to "0".
Example:
Gateshark Code:
10775318 000003E7
We just need the address so we remove the second part:
10775318
Now we change the first number of the address to zero
00775318
The reason we do this is because the first number just tells gateshark how to handle the code. Since we remove the gateshark instruction, we now have our 3DS memory address for rupees.

Step 8. (Finding Citra memory difference)
Now that we have our Citra memory address for rupees, and the 3DS memory address for rupees, we will need to convert any other codes we find in cheatengine to gateshark codes so other people can use them. In order to do that, we need to find the difference between the address.
We need to use a hex calculator to find that difference. This is the one I use which is web based and does not require you to download anything:
www.calculator.net/hex-calculator.html

We now subtract the 3DS address from the Citra address like so:
NOTE: THE CITRA ADDRESS CHANGES EVERYTIME YOU RE-OPEN CITRA SO MY CITRA ADDRESS WILL NOT MATCH YOURS

Finding Citra base Address
//[Rupees]
Citra Address: 280EB358
//minus
3ds Address: 00775318
//equals
27976040
//Citra Memory Difference
(3ds Address) + 27976040

Step 9. (Converting Gateshark codes to Citra Address codes)
We now test the Citra memory difference by using another gateshark code. In this example, I am using fairy sword on B button for Majoras Mask 3DS. We simply use the Citra Memory difference equation above to convert our gateshark code to citra.

Test
//[B button: Fairy Sword]
3DS code: 2077532A 0000004F
//Remove Gateshark definition
0077532A 0000004F
//Remove Values
3ds Address: 0077532A
//Citra Memory Difference
(0077532A) + 27976040
//New Address
Citra Address: 280EB36A

We now click "add address manually" in cheat engine to add the Citra Address. Cheat engine will have you enter in the address. The address we enter will be the Citra Address we just found. In the next fields you will have the option to name the code, and select the number of bytes. We will name the code: B Button: Fairy sword. Next we will use the first number of the original gateshark code to determine the number of bytes.
0 = 4 bytes
1 = 2 bytes
2 = byte

Since our original gateshark code begins with 2, we will select byte
(2077532A 0000004F)

Our final product should look like this:
Address: 280EB36A
Description: B Button: Fairy sword
Type: Byte

Finally click "OK"
The code should now appear in the bottom list of cheat engine. Right click the code we just added and select "Show as hexadecimal". Next, click the check box next to the code to activate it. Now change the value to 4F and return to the game. If we did everything correct, we should now pull out the Fairy sword when we press B.
Congratulations! We tested our first ported code.

Step 10. (Finding & Porting Citra Address codes to Gateshark codes)
This step requires you to use the tools in cheat engine to find your own code. If you need help with using the tools, there are plenty of tutorials online. For this example I will be using a brand new code I have found for MM3D.
I wanted to find a code to allow items to be used anywhere / anytime that are normally locked in certain situations. For example, in Zelda Majoras Mask, you cannot use the fierce deity mask unless you are in a boss fight. This code enables you to use it anywhere.

I remember in the N64 version that when an item was locked from use, the value would change to FF. This made finding the code extremely easy as I had experience with this code and the 3DS version is mostly the same. Since I know the usable items generate a value of 00, this makes my life a whole lot easier when searching.

I go in game and place a usable item on X button and run a first scan in cheat engine for the exact value (with hex checkbox checked) of 00. I then spam the next scan button until the code results on the left stop decreasing (or slows down). I then replace the item on the X button with an unusable one (Fierce Deity mask) before going into cheat engine and changing the value to FF. I then spam the next scan button until the value stops decreasing (or slows down).

I repeat the above process until I am left with two code results in the list to the left:
280FE95A
280FE958

I add both of these results to the bottom address list in cheat engine. I then right click one of them and select "browse memory region". Now when I set the memory viewer window next to the citra window, I can see values change from 00 to FF as I assign the unusable item (Fierce Deity's Mask) to each button one by one.

I can see a total of 4 bytes change from 00 to FF depending on the button. This makes sense as each button represents a byte. I then close out of the memory viewer and head back to the main window of cheat engine to define my address type. I double click on the byte type displayed after both of my addresses to change the bytes to 4.

I now enable the codes by checking the boxes next to them and changing the value to 00000000

Essentially our Citra Address code should look like this:
280FE95A 00000000
280FE958 00000000

I have now verified that when I press one of the buttons with an item that is unusable, I can use it. This means the code I found worked. We simply need to do the inverse of step 9 and subtract the citra memory difference from these codes using the hex calculator.

(280FE95A) - 27976040 = 78891A
(280FE958) - 27976040 = 788918

This leaves us with addresses that are two short. We must make them equal 8 characters long. We do this by adding zeros to the front which keeps the address the same, but also makes the addresses the correct length:

0078891A
00788918

Now we just need to replace the first number of each address with the gateshark instructions:

0 = 4 bytes
1 = 2 bytes
2 = byte

Since we are writing to 8 bytes we leave the first number of both addresses as "0"
We now have our Gateshark Addresses:

0078891A
00788918

We now add the values we modified from cheat engine after the Gateshark Addresses

0078891A 00000000
00788918 00000000

Lastly, we disable the codes in cheat engine and add/enable the Gateshark code we just made in Citra. If all goes well you should now see your code active using just the cheats function in Citra. Congratulations you just created a Gateshark code!

Footnote
I know this looks like quite a bit of work to do, but I assure you once you've done it once or twice it becomes a cake walk. I plan on uploading a video soon of this process. Please feel free to ask if you need anything clarified.
Hey, i can do a tutorial in spanish from this tutorial?
 

filantro

New Member
Newbie
Joined
Dec 8, 2017
Messages
1
Trophies
0
Age
28
XP
52
Country
Colombia
Hello, if the game i want to create gateshark codes doesn't have pre-made codes, how can i do to find the 3DS Address?
I hope your answer pal :)
 
  • Like
Reactions: Gran

RagoXXXX

Well-Known Member
Member
Joined
Aug 11, 2014
Messages
125
Trophies
0
Age
26
XP
993
Country
I'd also like to create cheats for the unknown games similar to Puzzle X Dragon Kami no shouta ^>^
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Had a ton of bugs and often crashed. It even didn't support DOS compatibility with older games. :feelsbadman:
  • SylverReZ @ SylverReZ:
    I only grew up with Windows XP because I was lucky.
  • RedColoredStars @ RedColoredStars:
    I downloaded XP on dialup when it came out. Overnights for like a week. cuz I couldn't tie up the phone line during the day. It was so awesome and worked so great going from ME to XP.
  • K3Nv2 @ K3Nv2:
    Vga pins were a dick
  • K3Nv2 @ K3Nv2:
    I kind of want down a large pizza at 10am then crash out
  • ZeroT21 @ ZeroT21:
    Having pizza all day? done it
  • K3Nv2 @ K3Nv2:
    Nah pizza hut open at 10:30
  • ZeroT21 @ ZeroT21:
    just buy a stack of pizza and keep the rest you don't need yet frozen
  • K3Nv2 @ K3Nv2:
    Or buy frozen pizza
  • ZeroT21 @ ZeroT21:
    I buy the regular kind, not the frozen stuff
  • ZeroT21 @ ZeroT21:
    supermarket pizza is ass
  • K3Nv2 @ K3Nv2:
    x65 would just yell at me
  • ZeroT21 @ ZeroT21:
    sounds ok, he didn't pull a gun out ,so...
  • K3Nv2 @ K3Nv2:
    $12 large any style pizza deal
  • K3Nv2 @ K3Nv2:
    Each bite is a $1 well spent
  • SylverReZ @ SylverReZ:
    @ZeroT21, Agreed. I hate oven pizza, only from pizza place.
    +1
  • K3Nv2 @ K3Nv2:
    Nah I can still go for totinos
  • RedColoredStars @ RedColoredStars:
    i like totinos party pizzas. lol.
  • RedColoredStars @ RedColoredStars:
    the cracker-like crust is great on those
  • RedColoredStars @ RedColoredStars:
    My neighbor and I are going to make this next month....
  • SylverReZ @ SylverReZ:
    Tiger crust is great.
  • K3Nv2 @ K3Nv2:
    I'm beefing with a neighbor currently each time I ask him for help with something he makes bs excuses then ignores my calls text but seems to randomly speak when I'm done with the project after doing things to help him
  • RedColoredStars @ RedColoredStars:
    DiGiorno Crispy Pan Pizza tasted pretty dang close to Pizza hut pan pizza, but Im not sure if theyve been discontinued or not. Havent seen them locally for a couple of months now.
  • RedColoredStars @ RedColoredStars:
    The croissant crust is still available though, but not quite as good imo.
    RedColoredStars @ RedColoredStars: The croissant crust is still available though, but not quite as good imo.