• 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 & Hex] Encrypt Variable

88
Posts
7
Years
    • Seen Jan 16, 2020
    Hi there,

    I've been trying to write values to variables stored in the DMA RAM. I've tried calling 0806e454 to get the address of the variable and then strh to store my desired value, but this doesn't seem to work. Is there a separate store/encrypt variable function? My knowledge of how the DMA memory works is limited.

    Thanks.

    EDIT: just kidding, my process was correct I just had other bugs in my code.
     
    Last edited:

    miksy91

    Dark Energy is back in action! ;)
    1,480
    Posts
    15
    Years
  • Hi,

    Not sure if I can help, but what are you trying to accomplish exactly? Are you just trying to experiment how DMA transfer in GBA works, or do you think you have an actual need for using it? I would assume that you don't have to use DMA unless you need to load / move lots of data in the ram at the same time.

    Also what comes to doing a DMA transfer, I would assume that there is some special instruction, or a set of instructions involved in using it. This is just an assumption, and I haven't really programmed with any assembly language using DMA before, so I don't really know how to use it in GBA.
    But I think it would make sense if DMA transfer could be evoked using an instruction like "fetch nn bytes of data from memory address xxyyzzqq (and store them at aabbccdd ?)" at the start of DMA memory (and these nn bytes would eventually land there by the definition of what DMA transfer does). That would after all only require one memory access (= fetching this CPU instruction) rather than several for copying values one by one (= wouldn't really be much more efficient than loading values elsewhere in ram I think).
     
    Last edited:
    Back
    Top