• 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

Logan

[img]http://pldh.net/media/pokecons_action/403.gif
10,417
Posts
15
Years
  • 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
    Why not just rename all your boxes region names and put the relevant Pokemon in there?
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • 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
    an insane amount of work
    this is so because of the RAM it takes up
    even with jpan's saveblock hack, you can add like, what another box and a half? it's not a lot, but it take up a lot of RAM
     
    21
    Posts
    8
    Years
    • Seen Jul 4, 2023
    an insane amount of work
    this is so because of the RAM it takes up
    even with jpan's saveblock hack, you can add like, what another box and a half? it's not a lot, but it take up a lot of RAM

    would still be an option to split up the boxes, its not about having extra space but i think itd be cool to kinda start over in a new region and getting a new starter instead of just rushing through the game with your pokemons that you used in the elite 4

    in the anime ash was only able to bring over a few pokemon i think?
     
    325
    Posts
    10
    Years
  • would still be an option to split up the boxes, its not about having extra space but i think itd be cool to kinda start over in a new region and getting a new starter instead of just rushing through the game with your pokemons that you used in the elite 4

    in the anime ash was only able to bring over a few pokemon i think?
    As hashtag said, you should just rename your boxes.


    Yes, but that's the anime; the hardware just can't support what you're trying to do.
     

    Deokishisu

    Mr. Magius
    990
    Posts
    18
    Years
  • As hashtag said, you should just rename your boxes.


    Yes, but that's the anime; the hardware just can't support what you're trying to do.

    I'm pretty sure that he wants the existing number of boxes divided up and separated so that they can only be accessed from certain regions (so basically, when a variable is set to this, only allow access to the first half of the PC. When a variable is set to that, only allow access to the second half of the PC.) Sort of a more elegant way to keep the player out of their main region's boxes than just locking the PC entirely, like Game Freak did at the beginning of the Sevii Islands plotline.
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • I like PokeMMO's solution to this. They made the player put all their Pokemon into the PC and started the second region fresh. Then when you tried to withdraw from the PC, it'd only let you withdraw Pokemon of certain levels depending on how many gyms you had defeated in the second region.
    Finding a reason to logically explain that phenomenon to the player might be harder than actually implementing it.
     
    58
    Posts
    8
    Years
    • Seen Jan 7, 2017

    Directly Send a Pokemon to PC

    It's just a simple hook but I haven't tested it yet.
    Routine:
    Code:
    .thumb
    .align 2
    @Please place a hook at 0x8040b46 (00 00 00 48 00 47 [pointer+1 to this routine])
    .equ flag_num, 0x250 @here you define your flag number
    .equ flag_check, 0x806E6D1
    .equ count_pokemon, 0x8040C3D
    .equ pkmn_addr, 0x2024284
    ldr r0, =flag_num
    ldr r1, =flag_check
    bl call_r1
    cmp r0, #1
    beq loc_8040b80
    ldr r1, =count_pokemon
    bl call_r1
    mov r5, r0
    cmp r0, #6
    beq loc_8040b80
    mov r1, #100
    mul r0, r1
    ldr r4, =pkmn_addr
    add r4, r0, r4
    ldr r0, =0x8040B63
    bx r0
    
    loc_8040b80:
    ldr r1, =0x8040b81
    call_r1:
    bx r1

    Please finish the hook and define the flag index as said in the comment above.

    Usage:
    Code:
    //CODES
    setflag 0x250 //the flag index is what you've set in the routine
    givepokemon 0x1 0x1 0x0 0x0 0x0 0x0
    clearflag 0x250
    //CODES

    Note:
    It's also compatible with my custom givepokemon here: http://www.pokecommunity.com/showpost.php?p=8942634&postcount=739
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • I think it would be an easier work if, after the player finishes the league and plans to start his/her journey on a new region, he/she will hand over all of his/her pokèmon, both on PC and party, to the professor or whoever is in charge there. So basicaly, a routine that erases all Pokèmon on the storage and party.
     

    Logan

    [img]http://pldh.net/media/pokecons_action/403.gif
    10,417
    Posts
    15
    Years
  • I think it would be an easier work if, after the player finishes the league and plans to start his/her journey on a new region, he/she will hand over all of his/her pokèmon, both on PC and party, to the professor or whoever is in charge there. So basicaly, a routine that erases all Pokèmon on the storage and party.
    It'd probably be better to send them into storage so you can access them again when the game finishes (maybe to trade) or use them later on (Elite4?)
     

    Joexv

    ManMadeOfGouda joexv.github.io
    1,037
    Posts
    11
    Years
  • how about a way to make no pokemon in your team or storage, but it stores it in the RAM?

    That would take up a hella amount of RAM. It may be possible with Jpans save block hack, but if you consider that each team consists of 600 bytes and then multiply that by region(up to 6 if we go official games) thats 0xE10 bytes of RAM.

    And looking at his hack it doesnt free up enough space in one place for something of this size
    Jpan said:
    0x0203C000 to 0x0203C0CC
    0x0203C0CC to 0x0203C324
    0x0203C324 to 0x0203CEC4

    So maybe one or possibly even two times you could do that. But that still leaves all the Pokemon in the PC.

    EDIT: And even compressing the Pokemon(removing current/total hp) wouldn't help enough to fit something like this.
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • Just curious, is RAM expansion not possible?
    i believe it's possible (i say this due to jambo wanting to have done it to create extra saveable space), but it breaks all compatibility with flashcarts and possibly has some other problems
    i'm no expert on it so you might want to get a second opinion but yeah
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • how about a way to make no pokemon in your team or storage, but it stores it in the RAM?

    This would be slightly easier than segregating the PC boxes, however, in the end it's the same amount of work. You still need to put said block of RAM into a save block.

    Just curious, is RAM expansion not possible?

    Nope.

    i believe it's possible (i say this due to jambo wanting to have done it to create extra saveable space), but it breaks all compatibility with flashcarts and possibly has some other problems
    i'm no expert on it so you might want to get a second opinion but yeah

    No, you can't expand the amount of RAM on the GBA. The GBA has 256KB of EWRAM, and a very low amount of that is used reasonably by FR. You're confusing saveblock space with EWRAM space ;)
     

    BluRose

    blu rass
    811
    Posts
    10
    Years
  • Spoiler:
    oh, goodness
    sorry darkdragon, i'm at school and was just sort of reading it without really thinking haha
     

    thedarkdragon11

    New World Pirate
    530
    Posts
    14
    Years
  • This would be slightly easier than segregating the PC boxes, however, in the end it's the same amount of work. You still need to put said block of RAM into a save block.



    Nope.



    No, you can't expand the amount of RAM on the GBA. The GBA has 256KB of EWRAM, and a very low amount of that is used reasonably by FR. You're confusing saveblock space with EWRAM space ;)

    That's sad... So there really is no way to expand the storage or add another one with the same size...
     

    Wesley FG

    Pokémon Kalos Advance !! Gba Hack
    338
    Posts
    15
    Years
  • Plz someone can re-upload "The Infamous JPAN Save Block Hack" ?
    it is download be attchment, but not work since pokecommunity are hacked.
     

    Phantom Phoenix

    Lost on the road of life
    167
    Posts
    8
    Years
    • Age 27
    • ???
    • Seen Jul 1, 2020

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Wild Pokemon With custom attacks


    I had some earlier issues with Custom Move routine, namely that it would cause every Pokemon to just use Struggle regardless of if I'd set the vars or not. After a couple conversations with FBI I've finally gotten it to work for me.

    FBI requested me to post this fix here, so I will be sharing his routine with permission.

    The first is the actual routine itself:
    Spoiler:


    The second is simply a hook to this routine:
    Spoiler:


    Assemble the first routine in free space. In the second routine, replace YYYYYY with the offset of the first routine (don't add one, the second routine adds one for you when you assemble it). After assembling both, copy and paste the second hook routine at 0x03EA48 (it should be eight bytes long and end with a pointer to the first routine). Then write "00 00" to 0x03EA46.

    To enable custom moves, set the flag 0x2B4. To disable it, just clear the flag. If you want to use a different flag, just subtract 1FE from the number flag you want to use and put that number (in hex) after the "add r0, r0," in the .main routine. For example, if you wanted flag 200 to be the toggle flag, you would put "#0x2" after the "add r0, r0,". You shouldn't increase it by higher than 0xFF.

    Otherwise its use is exactly the same as in the original post, just with a flag used to toggle it instead of a var.

    EDIT: I've noticed a really tiny bug where the last move (var 0x8003) will actually use the move that is one below it in index order. For example, if you put 0x15D (Dragon Dance), in game the Pokemon will have 0x15C (Leaf Blade) in that slot. Just add one to the index number of the last move and it will be fine. Otherwise everything works exactly how it's meant to.

    DOUBLE EDIT: The above bug only applies if you used the Shiny Pokemon hack where setting the var 0x8003 makes the pokemon you battle/get shiny. Var 0x8003 is also for the last move, so I believe if you have both this and the shiny hack then you'll need to do that. I could be wrong but I believe that's the case.

    How to use:
    Variables 0x8000 to 0x8003 are the 4 custom attacks you want inserted.
    So to set the first attack of the wild Pokemon to firepunch, I would setvar 0x8000 0x7.

    Here's a present :3
    LjzUa9a.png


    EDIT: Attacks must be between 0x0-0xFFFF

    EDIT AGAIN:
    I've had issues getting this to work on FlashCart. The game would say "Pokemon used !" and then crash. Not sure if this was just me or not, but I'd be careful if you use this in a hack that you'd want to be FlashCart compatible without further testing.

    I want to stress that I did not make this routine. I just tested it. FBI requested that I post the fix here after I finished testing it. All credit goes to him and not me.
     
    Last edited:
    58
    Posts
    8
    Years
    • Seen Jan 7, 2017
    I had some earlier issues with Custom Move routine, namely that it would cause every Pokemon to just use Struggle regardless of if I'd set the vars or not. After a couple conversations with FBI I've finally gotten it to work for me.
    FBI requested me to post this fix here, so I will be sharing his routine with permission.
    I want to stress that I did not make this routine. I just tested it. FBI requested that I post the fix here after I finished testing it. All credit goes to him and not me.

    I've made routines including these features:):
    http://www.pokecommunity.com/showpost.php?p=8942634&postcount=739

    Anyway, nice work for you to post the fixed code!
     
    Back
    Top