• 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.

Code: ASM Resource Thread

417
Posts
9
Years
    • Seen Nov 20, 2016
    I'll try to look at that, perhaps one of the addresses is incorrect.



    Tried this one, but it doesn't work correctly, I modified the routine because it doesn't compile to my compiler
    Spoiler:

    I changed that to 4 since I had expanded the TM and HM, then, this is my script:
    Spoiler:
    Var 8004 being the index number of Flygon
    and Var 8005 being the TM index which is TM 32 Double Team, it always jumps to YES even though I unchecked it.
    Wait, I don't even see what you changed with my routine besides putting actual numbers in the literal pool.
    Also, you saying you "unchecked it" makes me think you were modifying compatibility with a tool. But I don't think any tools currently out even support expanding TMs. You most likely had to expand the table by hand. Did you actually change the length of the compatibility table from 8 bytes per pokemon to 16 bytes?
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • Wait, I don't even see what you changed with my routine besides putting actual numbers in the literal pool.
    Also, you saying you "unchecked it" makes me think you were modifying compatibility with a tool. But I don't think any tools currently out even support expanding TMs. You most likely had to expand the table by hand. Did you actually change the length of the compatibility table from 8 bytes per pokemon to 16 bytes?

    I made lsl r0, r0, #0x3 to lsl r0, r0, #0x4, and about the tool that supports expansion of TM, D&D Editor of Dark Zeta does that
     
    7
    Posts
    8
    Years
    • Seen Nov 20, 2016
    I have tried all weekend and I cant get it. If anyone has the time, Id like some help with the following:
    ASM script to check and see if a Pokemon has any moves left in the Pokemon Relearner.

    Things I know:
    Special 0xDB pulls up a selection to select a pokemon
    0x8005 stores 0 if the pokemon has no moves to learn (From Two Island Move relearner)

    Not that great at finding code with breakpoints... So i need some help to intercept the above so that when I call the ASM script it will take in the party position and output if there is a move or not. (Basically special DB without thee selection screen + Waitstate)

    Thanks
     
    325
    Posts
    10
    Years
  • I have tried all weekend and I cant get it. If anyone has the time, Id like some help with the following:
    ASM script to check and see if a Pokemon has any moves left in the Pokemon Relearner.

    Things I know:
    Special 0xDB pulls up a selection to select a pokemon
    0x8005 stores 0 if the pokemon has no moves to learn (From Two Island Move relearner)

    Not that great at finding code with breakpoints... So i need some help to intercept the above so that when I call the ASM script it will take in the party position and output if there is a move or not. (Basically special DB without thee selection screen + Waitstate)

    Thanks
    I'm not sure why you'd want this, as without special 0xDB you'd always be searching the first pokemon in your party. On top of that, you'd probably end up storing the results back into a var anyway. If the special and 0x8005 works, why fix something that's not broken?
     
    7
    Posts
    8
    Years
    • Seen Nov 20, 2016
    Well it's not broken but its inconvenient. I have the party position of the pokemon already from previous code, but then to ask the user to select the pokemon in question again is redundant.

    Maybe I did a poor job in explaining. What I am after is to mimic the above special 0xDB but skip the selection screen and instead input the variable for party position. I can do most of the work. Just need help locating where the code is located in the ROM. Then I can make a hook & catch.
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • Well it's not broken but its inconvenient. I have the party position of the pokemon already from previous code, but then to ask the user to select the pokemon in question again is redundant.

    Maybe I did a poor job in explaining. What I am after is to mimic the above special 0xDB but skip the selection screen and instead input the variable for party position. I can do most of the work. Just need help locating where the code is located in the ROM. Then I can make a hook & catch.

    Well you wouldn't really need any hooks. Just copy the special 0xDB routine and modify it to instead read from a variable rather then the selection. I would help by giving a maybe offset to start with but idb isnt working for me right now.
     
    417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    Well it's not broken but its inconvenient. I have the party position of the pokemon already from previous code, but then to ask the user to select the pokemon in question again is redundant.

    Maybe I did a poor job in explaining. What I am after is to mimic the above special 0xDB but skip the selection screen and instead input the variable for party position. I can do most of the work. Just need help locating where the code is located in the ROM. Then I can make a hook & catch.
    I don't get what you're looking for, but you can find the pointer to any special routine with the table and some maths. For FireRed, the special table is at 0x0815FD60.
     
    42
    Posts
    8
    Years
    • Seen May 2, 2024
    Hi,

    Is making the move tutors reusable doable via ASM, or is there just a specific flag that gets set in their routines that needs to be removed?
     
    42
    Posts
    8
    Years
    • Seen May 2, 2024
    Its a flag in their script.

    I see, I guess I'll have to find all the move tutors and remove the flag condition.

    ......and fix their text because I changed what most of them teach.

    Now I have another question concerning the Dawn Stone routine that was posted here, since my ROM contains all the Gen 4 evolutions and I wasn't sure on how I'd correctly work Gallade/Froslass:

    Spoiler:


    Does the "indexes" refer to the indexes of the Pokémon that evolve by Dawn Stone (Kirlia, Snorunt), or the indexes of Pokémon that have evolved from Dawn Stone (Gallade, Froslass)?

    And....

    Spoiler:


    What does it mean by main function, and what does the 0x4318e refer to?
     
    41
    Posts
    10
    Years
  • Could someone make a asm thingy for emerald that advances the rtc by game time times 2 or 3? for when you don't actually have an rtc (flashcarts)
     
    41
    Posts
    8
    Years
    • Seen Aug 3, 2019
    I don't know if anyone's been working on this lately, but I've been itching to share this.

    FireRed lacks a system that uses a Region Dex order seperate from the National Dex. If you were to have a Region Dex and a National Dex, your National Dex would look unprofessional. What I'm putting here is my work towards a Region Dex system for FireRed. I would like to stress however that it is both unoptimized and unfinished, but I really wanted to release this.

    The current routines
    Spoiler:


    Send me a PM if you're interested in fixing up what's left.
     
    Last edited:
    417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    Cool. Seems very useful so people don't do the "national dex at start" all the time :) But in "Loading the right species," I assume the "bx r1" is meant to be a bl linker? You're never going to reach the mov r5, r0 and return :P

    EDIT: meant to quote AngryBird
     
    41
    Posts
    8
    Years
    • Seen Aug 3, 2019
    Cool. Seems very useful so people don't do the "national dex at start" all the time :) But in "Loading the right species," I assume the "bx r1" is meant to be a bl linker? You're never going to reach the mov r5, r0 and return :P

    I know you misquoted me but thanks! I actually put in an outdated version by accident. The correct version doesn't even call the routine in the first place. I'll fix it right away.
     
    40
    Posts
    11
    Years
    • Seen Nov 16, 2023
    Hey !
    So first I want to say, I've really a bad level. I know HOW to put the routine on ROM, and to be honnest, I'm too stupid to understand ALL the routine things. But here's my "little story"

    So, I wanted to do a FR 1/256 Shiny Rate for myself, because i want to relax a little from always Shiny Hunting like a crazy guy. But it's really a IMPORTANT project for me. I've found this asm thread, found what I wanted. So i've started to learn ASM, but to be honnest not the "what this means" thing. But here's my problem :

    I did my 1/256 rom. It's working. No problem. Except one (but after speaking with an other guy who did the same he has the same problem) : The gender (or the nature for his case) is always the same. In my case i always have female Shiny. I really would like to keep the random of Gender + Nature for my 1/256 Shiny (like in my 4G/5G 1/256 hack-rom)

    So I'd to know if somebody can find the way to fix this. For information :

    I use these :

    http://www.pokecommunity.com/showpost.php?p=8531430&postcount=249
    First the RNNG.
    http://www.pokecommunity.com/showpost.php?p=8531480&postcount=251
    After this one, for the Shiny Pokémon PID Generation (and may be it's the problem ?)

    and finally my "own" Shiny Rate script :

    Spoiler:

    Any help ?
    Thank you !
     

    Trainer 781

    Guest
    0
    Posts
    Sitrus Berry Update:
    Spoiler:


    Berry Activation Update:
    Spoiler:
     
    Last edited:

    Pheonix x

    Hello!!
    7
    Posts
    8
    Years
    • Seen Sep 1, 2017
    If it is possible can somebody make a asm for sprite switching for gogoat system.
     
    21
    Posts
    8
    Years
    • Seen Jul 4, 2023
    has anyone ever thought about seperate pokemon storage systems for each region? Or would that be an insane amount of work?

    I think itd be really cool
     
    Back
    Top