Beginner at gba asm hacking, question about break points

Discussion in 'GBA - Game Development, ROM Hacks and Translations' started by Zalor, Mar 14, 2016.

  1. Zalor
    OP

    Zalor Newbie

    Newcomer
    2
    1
    Mar 14, 2016
    United States
    I'm fairly new to the gba asm hacking scene, and have mostly been learning through trial and error and from tutorials here and there. Additionally, I have very little programming knowledge. I understand how hexadecimal works, and have some knowledge of memory hacking. Just to give an idea of where I am coming from.

    My question is about setting breakpoints in no$gba's special debugger emulator. I am having trouble where I will set the debugger to break at a certain value, and nothing happens. Specifically, I know a character's hp address in the game's memory is in 02007a14, but when I type this address as a break point, I get nothing. Even when the character takes damage and I know that the value in the address is getting modified, the debugger doesn't break. I apologize for such a noob question, but could somebody explain what I am doing wrong?

    Additionally, could somebody also give me some general advice on how to learn asm hacking as a beginner. The few other times I asked for help regarding asm for the gba, people just linked me to this: http://re-eject.gbadev.org/files/thumbref.pdf, which doesn't really explain much for me. So if somebody could help a noob such as myself figure out how to start off, I would really appreciate it.
     
  2. Pablitox

    Pablitox GBAtemp Advanced Fan

    Member
    739
    380
    Oct 18, 2011
    Argentina
  3. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,826
    9,719
    Nov 21, 2005
    United Kingdom
    For a beginner then I like
    http://www.coranac.com/tonc/text/asm.htm
    It will not cover much for hacking and I hesitate to link the following if you are using no$gba debugger as it is for another GBA debugger but it does cover some of the breakpoints available in lots of debugging tools such that you might get a better idea. https://web.archive.org/web/20150428020823/http://labmaster.bios.net.nz/vba-sdl-h/
    Depending upon what breakpoint you have set then you might not get anything -- if you set an execute breakpoint when you instead want a read or write (or access) breakpoint then it is not going to do much.
    no$gba help is pretty good as well, the reference guide to GBA hardware that most of us use is drawn from them ( http://problemkaputt.de/gbatek.htm ).

    I cover some basic assembly, though with a slight DS focus (not that is matters hugely), in http://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2016-edition-out.73394/ as well.
     
  4. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    2,142
    544
    Dec 14, 2004
    New Zealand
    Your setting the breakpoint wrong most likely.... it should be "[02007a14]!" if you want to break on changed writes to that address or "[02007a14]!!" to break on any writes or "[02007a14]?" if you want to break on any reads.
     
  5. Zalor
    OP

    Zalor Newbie

    Newcomer
    2
    1
    Mar 14, 2016
    United States
    Thanks for all the links to the resources. The first link is great, and I actually started reading it a couple days ago. Also your guide is really extensive, and I plan on working my way through it as well.

    Thank you so much, you were correct. I was setting the break points wrong. I tried your suggestion for when the game writes to the address, and it worked! Is there an instruction set for setting breakpoints in the no$gba debugger like there is for the vba one?
     
    Pablitox likes this.