• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

ASM Tutorials

Blah

Free supporter
1,924
Posts
11
Years
  • Thanks! Now it's working! Btw, I like your ASM tutorial. :)
    Thanks, I'm glad you like it!

    Hello? This tutorial is nice. I have gone through your tutorial "Intermediate guide (ASM Skill 5/10)" and I have tested it but I do not know much about the ram offset "02021D18". You said that it's "the RAM location for displayed strings in textboxes for scripted messages", so why it's safe? When will it be overwritten?

    I did a lot of testing with this RAM offset. Basically if you do use scripting to set a buffer, it does a memory copy of what's in one section of RAM to another section of RAM (which it reads when the buffer is called again). So if I did something like:
    Code:
    ...
    buffer from RAM to buffer
    msgbox @something 0x6
    ...
    Then before the msgbox is executes and eventually overwrites the RAM buffer, it's copied over. Meaning it's safe to use.


    FBI, you will just never disappoint me! This tutorial is incredible, even after going through all the other ASM tutorials, I only got the basics of how to use the commands, but you definitely know how to teach this, only read 1/2 but LOVE this tut!!! Keep up your Freaking amazing work bro!! :D

    Thanks, I'm glad you like it!

    These are really good FBI. It's nice to see some of the actual techniques publicly available here. FYI, hooking is an actual programming term, not just something I use. It would be nice if you did some IDA tutorials so people can become wizards actually learn to hack.

    I'll come up with something and thanks!


    Little (big) announcement:
    I'm going to be making ASM workshops. Basically every week, I make an ASM challenge, and the learning community can try and solve it before the end of the week. It'll start off easy, and end off hard. Christos says I should make a new thread for that, so that's what I'll be doing. I'll also include video of me doing it (with commentary) or I'll write down a sort of mini-tutorial. Look forward to that, and hopefully we get a lot of participators!
     
    15
    Posts
    9
    Years
    • Seen Oct 22, 2021
    Urmm... It seems that "Finding the last trainer's name" ASM doesn't work when I save the game, and reload the game.
    Should I do something with SAVE function?
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • Urmm... It seems that "Finding the last trainer's name" ASM doesn't work when I save the game, and reload the game.
    Should I do something with SAVE function?

    If the table has been repointed, or you are using Emerald, it won't work for you. Also it's possible that your script is incorrect. The routine doesn't have any problems with it :)
     
    15
    Posts
    9
    Years
    • Seen Oct 22, 2021
    If the table has been repointed, or you are using Emerald, it won't work for you. Also it's possible that your script is incorrect. The routine doesn't have any problems with it :)
    I'm using Firered(Squirrels) and flag ID is located at 0x020386AE, but it resets its value to 0x00 when I save the game and continue it.
     

    Turtl3Skulll

    Blue Turtl3
    76
    Posts
    10
    Years
  • I've been following the tutorial again after a few years, and I seem to be stuck on the 3.5/10 bonus challenge.

    The script I used was this:
    Code:
    #dynamic 0x740000
    #org @start
    lock
    faceplayer
    random 0xFF 
    callasm 0x720001
    bufferstring 0x0 0x2021D18
    msgbox @text 0x6
    callstd MSG_NORMAL
    release
    end
    
    #org @text
    = I love the move \v\h02!

    and the ASM Routine I made was this:
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {r0-r2,lr}
    	@Read value of 0x800D LastResult
    	ldr r0, = (0x20370D0)
    	ldrh r0, [r0]
    
    	@get distance to travel on the moves tables
    	mov r1, #0xE
    	mul r1, r0, r1
    
    	@Load move table and walk distance
    	ldr r0, = (0x8247094)
    	add r1, r0, r0
    	ldr r0, = (0x2021D18)
    
    	@call function to save string ending in 0xFF. Inside pointer r0?
    	ldr r2, = (0x8008D8 + 1)
    	bl linker
    
    	pop {r0-r2, pc}
    
    linker:
    	bx r2
    
    .align 2

    The game crashes once I talk to the NPC. The routine is in 0x720000 & the script inside of 0x740000.
    Any help would be appreciated.
     
    Last edited:
    7
    Posts
    4
    Years
    • Seen Oct 3, 2019
    I am very noobish with ASM right now and I find it intimidating because of how tedious it appears to be to make advanced routines... nonetheless, these tutorials are very informative and very well put together! Thanks!
     
    2
    Posts
    144
    Days
    • Seen Jan 5, 2024
    Forgive me if this is a stupid question, but does ASM apply if you're using a program like HexManiacAdvance?
     
    Back
    Top