ROM Hack How to search for pointers W/ Gateway?

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,147
Trophies
2
Location
Chicago
XP
4,667
Country
United States
I've been making codes for a while now and am finally ready to learn how to use pointers. I have a basic understanding of how they work, but if someone could explain them and tell me how to find one and the proper codetype to use it with, that'd be great!

Thanks
 

DesuIsSparta

Well-Known Member
Member
Joined
Oct 13, 2015
Messages
580
Trophies
0
XP
1,027
Country
United States
A pointer points to a value stored at a an address in memory.

In order for us to change the player's health, we have to first find the address at which the address is referenced. If you're on PC you can just use Cheat Engine to do this, or on the 3DS you can use NTR or possibly even gateway, but I don't know how that works, so I can't tell you about that.

Once we find the place a value is referenced, we can just edit the value to what we want. But notice if you make the health 9999/1000, and the player gets hit, he might drop to 9998/1000 or even 999/1000 which would mean you will have to use the cheat again before the player dies. But what if we wanted the player to be invincible? Well depending on how you're cheating, you may be able to freeze the value. Cheat Engine can do this, but that's not a 3DS tool. So what we need to do is find out what is telling the value what to be. This is a 'pointer'. The pointer tells the references what the value should be. If you only edit a reference, the pointer will just continue with what it knows how to do. But what happens if we give the pointer new instructions? Then it will relay our message to all of the child references, so in this case when the player gets hurt or drinks a health potion, they will be invincible health-wise without having to edit every single reference everytime the health is updated.

But how do you find pointers?

Well, it can be quite difficult, especially for a beginner. If you don't know how memory works, I suggest watching some YouTube videos about it, as well as reading up on basic hex values. You should know 0-F and what they mean in integer format (e.g. 1 is 1, A is 10, and 10 is 16). After that, you need some way of reading the memory in a way that allows you to analyze the data between sequences. Breakpoints are very often used in debugging to find out what's going on with the program. When we set a breakpoint, the program will be stalled when it reaches a certain point in memory, and we can read all of the information it has before it continues. This allows us to analyze the data with as much time as we need. After we're done analyzing, we can step the program ('continue' is a loose word), and it will continue until the next breakpoint or the next memory change (it depends on the program you're using to debug). Programs like Cheat Engine are easy to use to find pointers, because they have a simple option to 'find where this address is written to from', which can help you find a pointer in a matter of minutes. But if we don't have such an option, which I'm more than certain we don't on 3DS memory debuggers, then we have to find the pointer the old fashioned way. Set a breakpoint, dump the data, pass the breakpoint, dump the data, then analyze the dumps.. I'm not sure how well that works, but it'd probably be a mess if it even works.

Here's a tutorial in Chinese for NTR, but the translation will be broken and likely confusing in English if you use Google Translate, though that's your best option.
http://www.speedfly.cn/9892.html

Note that in that tutorial, NTR 2.2 is being used, with debugger 2.2 DEX which a Chinese user custom-made including the ntr.bin file but is only available on the o3DS (As versions of NTR below 3.0 are only compatible with N3DS).

Sorry my explanation is kind of shitty, you'll likely find a better explanation on Google.
 

Spider_Man

Well-Known Member
Member
Joined
May 28, 2015
Messages
3,799
Trophies
0
Age
37
XP
4,796
Country
United States
I'm having to try find a pointer for a game but not sure how youd do it so the code works for the entire game rather than each level/character.

I can find the code, restart the level and find the code again, use both dumps to find the pointer, but it only applies to that level/character.

It would be ideal if i could find the pointer so its just one code.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    There are different ways of fanservice
  • Skelletonike @ Skelletonike:
    the first manga I bought, was Psychic Academy, when I was like 12?
  • Skelletonike @ Skelletonike:
    That was good 2000s ecchi
  • Skelletonike @ Skelletonike:
    Great plot too
  • Vetusomaru @ Vetusomaru:
    psychic academy. lol. it was meh even back then when i bought volume 1. also same author also made one of the manga adaptions of Escaflowne.
  • Skelletonike @ Skelletonike:
    Pfffft!
  • Skelletonike @ Skelletonike:
    I have all the volumes.
  • Vetusomaru @ Vetusomaru:
    btw do u have discord?
  • Vetusomaru @ Vetusomaru:
    last tv anime i remember with nipples i personally watched was Senran Kagura
  • Skelletonike @ Skelletonike:
    yeah I do
  • Skelletonike @ Skelletonike:
    I mostly read, haven't watched much, but I do keep my cunchyroll sub.
  • Skelletonike @ Skelletonike:
    Found out one of my fave animes got an adaptation this season

    the other day lol
  • Skelletonike @ Skelletonike:
    Yuusha ga Shi
    nda
  • Vetusomaru @ Vetusomaru:
    crynchyrolls is cancer, especially with the censorship they do like they did with Oshimai
  • Vetusomaru @ Vetusomaru:
    can u post your discord here or at dm?
  • Skelletonike @ Skelletonike:
    No idea
  • Skelletonike @ Skelletonike:
    it's my username
  • Vetusomaru @ Vetusomaru:
    and number?
  • Skelletonike @ Skelletonike:
    it needs the number?
  • Vetusomaru @ Vetusomaru:
    okey dokey. i ve sent u friend request.
  • Vetusomaru @ Vetusomaru:
    i have same username with here
  • Skelletonike @ Skelletonike:
    alright, accepted
    +1
    Skelletonike @ Skelletonike: alright, accepted +1