• 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

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
I'm not sure if it's done yet or not, but... Would it be possible to have a routine that acts like a warp but enables you to choose bank, map and possition via variables instead of fixed parameters like the actual commando on XSE (and similar)

The normal warp commands parse the variables for X and Y coords. Just get it to do the same for the first three parameters instead of just taking them as they are.
 

Ayonn-

The Unbelivable
209
Posts
9
Years
I have two questions:
Did anyone try to increase the storage capacity of the PC in Fire Red ?

Is there a ASM routine for fire red to randomize Wild pokemon and the Trainers pokemon ?
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
I've noticed significant demand for working Dawn Stone evolutions, specifically ones that require the mon to be a specific gender. My bad if this is already posted somewhere but here y'all go:

Code:
cmp r0, #0x7
beq StandardStone
cmp r0, [COLOR="Red"][B]#0x14 [/B][/COLOR]#UPDATE THIS
beq MaleStone
cmp r0, [B][COLOR="Red"]#0x15[/COLOR][/B] #UPDATE THIS

1. Are 0x14/0x15 supposed to be the index-numbers of the evolved or the un-evolved Pokemon? (ie Snorunt or Frosslass?)
2. I can't compile with Pokemon above 255 (FF). Is there a way around this?

Thanks!
 

BluRose

blu rass
811
Posts
10
Years
1. Are 0x14/0x15 supposed to be the index-numbers of the evolved or the un-evolved Pokemon? (ie Snorunt or Frosslass?)
2. I can't compile with Pokemon above 255 (FF). Is there a way around this?

Thanks!
0x14 and 0x15 are going to be the index numbers of the evolution method (Male Stone and Female Stone, respectively). For example, the original Stone evolution method is index 0x07.

EDIT: At least, it looks like it, haha...
 

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
Misc:

Evolution via Callasm in FR

Spoiler:

A EV-IV Display Screen

FIRERED:
Link Removed!
EMERALD:
Link Removed!
I'm surprised that this one was abused in this forum. These repos were written when I was a complete noob for the sake of practice and I really feel ashamed. Pls, don't use them. If you really need them, go ahead to my github account and they're still available.

Quick Preview:
q_zpshnquzant.gif
18HjHg0.png

OLD CONTENT (Outdated):
Spoiler:

80x80 mugshots

Spoiler:

Some new movement bytes (including a patch)

Spoiler:
 
Last edited:
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
What. You created customized (and interactive) graphics, repurposed a messagebox, and made custom movements, but started the post with a routine that calls evolution? x_x I almost didn't read the rest. Very cool, of course, but you totally buried the lead.
 

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
What. You created customized (and interactive) graphics, repurposed a messagebox, and made custom movements, but started the post with a routine that calls evolution? x_x I almost didn't read the rest. Very cool, of course, but you totally buried the lead.
TBH, the first one may be not cool, but should be the most difficult one to figure it out (at least for me).
 
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
TBH, the first one may be not cool, but should be the most difficult one to figure it out (at least for me).
Ah, that's interesting. I would expect the graphical stuff to be significantly harder, but I don't have experience with it, so I guess I wouldn't really know. Graphical hacking seems to be largely untapped with most hackers here, so maybe it is seen as more complicated than it really is. Anyways, sorry for going a bit off topic. Cool hax :D
 

BluRose

blu rass
811
Posts
10
Years
What. You created customized (and interactive) graphics, repurposed a messagebox, and made custom movements, but started the post with a routine that calls evolution? x_x I almost didn't read the rest. Very cool, of course, but you totally buried the lead.

It's one of the reasons I still go to WaH; he's had all of them done for a while and has been posting over there. Almost surprised he didn't bring over his Trainer Card modifications (albeit incomplete) and his EV/IV Display Screen...
I also go there to type in Spanish because I need to improve it, but... oh well.
 
788
Posts
17
Years
  • Age 29
  • Seen yesterday
As part of fixing this, I realized that it could be done simply by changing the target of a branch-link instruction, and it requires no free space at all. As such, I decided to post in Quick R&D instead (which is where it probably should have been in the first place).

Link.
 
Last edited:

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
Incidentally, if anyone knows a built-in asm routine to count Pokemon (and not eggs), please let me know. If one exists, this could be rewritten to only use a couple of bytes.
Special 0x84, or the function at 0x808C13C.
Code:
/*This is directly copied from knizz's idb 
and I haven't set the function type, 
so the return value type is not shown as u8*/

int sp084_party_count_pokemon_no_egg()
{
    int v0; // r5@1
    int v1; // r6@1

    v0 = 0;
    v1 = 0;
    do
    {
        if ( pokemon_getattr(&party_player[v0].base, req_species) )
        {
            if ( !pokemon_getattr(&party_player[v0].base, req_is_egg) )
                v1 = (v1 + 1) & 0xFFFF;
        }
        v0 = (v0 + 1) & 0xFFFF;
    }
    while ( (unsigned int)v0 <= 5 );
    return (unsigned __int8)v1;
}
 
788
Posts
17
Years
  • Age 29
  • Seen yesterday
Special 0x84, or the function at 0x808C13C.
Code:
/*This is directly copied from knizz's idb 
and I haven't set the function type, 
so the return value type is not shown as u8*/

int sp084_party_count_pokemon_no_egg()
{
    int v0; // r5@1
    int v1; // r6@1

    v0 = 0;
    v1 = 0;
    do
    {
        if ( pokemon_getattr(&party_player[v0].base, req_species) )
        {
            if ( !pokemon_getattr(&party_player[v0].base, req_is_egg) )
                v1 = (v1 + 1) & 0xFFFF;
        }
        v0 = (v0 + 1) & 0xFFFF;
    }
    while ( (unsigned int)v0 <= 5 );
    return (unsigned __int8)v1;
}

Nice. Thank you, I'll update my routine when I get the chance.
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Misc:

Evolution via Callasm in FR

Spoiler:

A EV-IV Display Screen

Spoiler:

80x80 mugshots

Spoiler:

Some new movement bytes (including a patch)

Spoiler:

These are very helpful, but the first routine, for me must be edited. Instead of the first pokemon in your party, why not party slot? Correct me if I'm wrong, code for specific party slot is easier than index number of Pokemon. It would be helpful for special 0x9F.
 

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
These are very helpful, but the first routine, for me must be edited. Instead of the first pokemon in your party, why not party slot? Correct me if I'm wrong, code for specific party slot is easier than index number of Pokemon. It would be helpful for special 0x9F.
Why do you think that it's the first pokemon? The function will search the pokemon with specified species in your party and get the first pokemon of that species in your party. For the special 0x9F, I haven't researched the special functions at that time (now i have one but in chinese so i don't publish it) so I just wrote a custom one.
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Why do you think that it's the first pokemon? The function will search the pokemon with specified species in your party and get the first pokemon of that species in your party. For the special 0x9F, I haven't researched the special functions at that time (now i have one but in chinese so i don't publish it) so I just wrote a custom one.

yeah, the bolded one is the good way to describe what I'm talking about.
 

BluRose

blu rass
811
Posts
10
Years
I really don't understand what you mean.....
I think it's exactly what I did and described in my post.
I think he's asking to use Party Slot in 0x8004 instead of Species Index.
A problem arises: Your party slots aren't exactly set in stone, and you might evolve the wrong Pokémon... I don't get how it would help with Special 0x9F? Granted, I don't really know what it does...
 

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
I think he's asking to use Party Slot in 0x8004 instead of Species Index.
A problem arises: Your party slots aren't exactly set in stone, and you might evolve the wrong Pokémon... I don't get how it would help with Special 0x9F? Granted, I don't really know what it does...

Yes, I also don't know how to use a party slot as a parameter by a scripter as we always don't know what's the player's pokemon. Special 0x9F is a pokemon selection screen, but who knows what the player will do? If I use it, i must decrypt its species as well.
 
Back
Top