• 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

jiangzhengwenjzw

now working on katam
181
Posts
11
Years
  • Seen today
It doesn't change Elite Four and Champion classes. What I mean is... if I set 0x100, 0x200, or any value, it doesn't go to the specific value but it goes to 0x100 instead.
This one is ported from Jambo51's firered one, so it inherited the fact that the elite 4 and champion's classes won't be changed. You can try to remove the relative checks in the codes, I guess it should work. (perhaps you should adjust it a bit. I'm not sure since I don't have time to hack for months)
 
40
Posts
11
Years
  • Seen Nov 16, 2023
Hey o/ !
I'm posting here because i need a really little help. I'd like to add a Shining Charm to a Fire Red Hack. I know how to do it, I already did it before. But i've a problem this time. In the post, FBI takes the basic (NEW) rate of 1/4096 with this way :

normal:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally

But I'd like to use the REAL classic one, aka 1/8192 rate. But to be honnest, if I know how to apply ASM in hack, i'm not good enough to make ASM myself, so if somebody could give me the right lines to have the 1/8192 rate, it'd be nice

Thanks o/
 

BluRose

blu rass
811
Posts
10
Years
Spoiler:
small lesson
every hexadecimal byte represents an arrangement of bits
little "table":
Spoiler:

so, what about it? well, the lsl command in asm (logical shift left) takes the value in the register taken as a parameter, shifts its bit position the amount to the left as what is defined, and then puts the result in the other register that was a parameter.
let's take a look at the code snippet.
Code:
normal:
        mov r0, #0x20 @puts the value 0x20 into register 0
        lsl r0, r0, #0x7 @"bitshifts" the value in register 0 left by 7 places, storing it back in register 0
so, how do we know the resulting value?
well...
0x20 in binary is 0010 0000.
move that value left seven places by appending the necessary zeros on at the end
0010 0000 0000000
cut it up into correct pattern, appending zeros at the front when necessary (it is)
001|0 000|0 000|0000 = 0001 0000 0000 0000
new value: 0x1000. decimal equivalent? 4096.
so, what about getting 8192 in there?
do this process, but backwards~ report back your thought process, i wouldn't want you to get it wrong~
 
40
Posts
11
Years
  • Seen Nov 16, 2023
Hey o/ !

Sorry for the so late answer (was working so didn't have the time to check) but I have to say THANK YOU SO MUCH. I'm using this for many hack and wanted to test different shiny rate. With this, i'll be able to use the rate I want, so much better than a simple answer, I can't thank you enough for that.

About my conversion, I've to admit there's a part that i'm hitting something, but not sure if i'm right.
SO backwards.

Decimal : 8192
Hexadecimal : 2000 (so 0x2000)
Binary : 10000000000000

So cuted, I have :
(0)10|0000|0000|0000
in ( ) the appending zero ?

and after, I'm quite lost. I've to take the 8 first 0 and 1 so, 0100 0000, with 7 0 left.
so i've 0x40 and 0x7 (this time too)

Am I right ?
Thanks o/
 

Blah

Free supporter
1,924
Posts
11
Years
Hey o/ !

Sorry for the so late answer (was working so didn't have the time to check) but I have to say THANK YOU SO MUCH. I'm using this for many hack and wanted to test different shiny rate. With this, i'll be able to use the rate I want, so much better than a simple answer, I can't thank you enough for that.

About my conversion, I've to admit there's a part that i'm hitting something, but not sure if i'm right.
SO backwards.

Decimal : 8192
Hexadecimal : 2000 (so 0x2000)
Binary : 10000000000000

So cuted, I have :
(0)10|0000|0000|0000
in ( ) the appending zero ?

and after, I'm quite lost. I've to take the 8 first 0 and 1 so, 0100 0000, with 7 0 left.
so i've 0x40 and 0x7 (this time too)

Am I right ?
Thanks o/

Hi.

Replace
Code:
mov r0, #0x20
lsl r0, r0, #0x7 @1/4096 chance normally


with

Code:
ldr r0, =(4096)

Change 4096 to the chance value of your choosing.
 
40
Posts
11
Years
  • Seen Nov 16, 2023
Thank you so much for this solution too !
So I think I was far from the good answer haha, but this will help me a lot when I need to change the rate fastly, so it's awesome o/
 
352
Posts
7
Years
  • Age 30
  • Seen Mar 10, 2022
Someone can fix this routine?

Spoiler:


This routine deletes the last item used when catching Pokémon, it's used combined with the 0xA1E30 byte change, to prevent PokéBalls being consumed after fails catching, but when I fish into the Safari Zone and catch a Pokémon, the last item used is my rod, and it disappears. I will be grateful if someone fix this or even make flag activator/deactivator for this routine.

This routine was made by FamiliaWerneck
 
Last edited:
352
Posts
7
Years
  • Age 30
  • Seen Mar 10, 2022
Hello, I'm here to request somethings I think are hard to do, I've replaced the Premier Ball with Mewtwo Ball, then I want to make it catch without fail like Master Ball, and I want to make a Ball to make any Pokémon caught become Shiny. Next, an upgrade to FBI's Toggling Wild Pokémon Capturability to create a table to specify the species of Pokémon to be uncapturable permanently. Finally, an upgrade to jiangzhengwenjzw's Evolve via Callasm to select the specific Pokémon allowed to evolve on that NPC via "special 0x9F", and another detecting if the selected Pokémon is holding an specific item. (Example: The NPC allows only Kadabra to evolve into Alakazam, then the player selects one Kadabra in their party to evolve; the second will be the same, but with holding item check feature.)
 
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
Hello, I'm here to request somethings I think are hard to do, I've replaced the Premier Ball with Mewtwo Ball, then I want to make it catch without fail like Master Ball, and I want to make a Ball to make any Pokémon caught become Shiny. Next, an upgrade to FBI's Toggling Wild Pokémon Capturability to create a table to specify the species of Pokémon to be uncapturable permanently. Finally, an upgrade to jiangzhengwenjzw's Evolve via Callasm to select the specific Pokémon allowed to evolve on that NPC via "special 0x9F", and another detecting if the selected Pokémon is holding an specific item. (Example: The NPC allows only Kadabra to evolve into Alakazam, then the player selects one Kadabra in their party to evolve; the second will be the same, but with holding item check feature.)
I don't know about the Mewtwo Ball or the Make-Whatever-I-Catch-Shiny Ball but, I can give a guess for the other two.
1. For the uncapturable species, I think you can set the species' catch rate to 0.
2. Maybe there's a better way to do this but for me it can be use the check species hack somewhere here in Pokecommunity (I think it's here in the ASM Resource Thread or the Quick Research and Development Thread) and the use jiangzhengwenjzw's evolve via callasm. Or if you want to check the item, use the check species, then the check party item, and then jiangzhengwenjzw's evolve via callasm. Did that make sense? :(
 
352
Posts
7
Years
  • Age 30
  • Seen Mar 10, 2022
I don't know about the Mewtwo Ball or the Make-Whatever-I-Catch-Shiny Ball but, I can give a guess for the other two.
1. For the uncapturable species, I think you can set the species' catch rate to 0.
2. Maybe there's a better way to do this but for me it can be use the check species hack somewhere here in Pokecommunity (I think it's here in the ASM Resource Thread or the Quick Research and Development Thread) and the use jiangzhengwenjzw's evolve via callasm. Or if you want to check the item, use the check species, then the check party item, and then jiangzhengwenjzw's evolve via callasm. Did that make sense? :(

1. If I make the catch rate 0 it still catchable with Master Ball.
2. I've tried to combine those routines, but I don't know if I'm doing something wrong, but it gives me a crash or simply don't works, I think I need a second one.
 
232
Posts
12
Years
  • Seen Sep 10, 2019

Preventing TMs from being consumed on use


Make it Ungivable:
insert that at 0x1326B8: 00 00 17 E0

This works in not allowing the TMs to be given when using the 'give' command through the Bag, but it can still be given through the 'give' command when selecting a Pokemon in the player's party. Is there a way I can make it so that the TMs can't also be given through party?
 

Blah

Free supporter
1,924
Posts
11
Years
This works in not allowing the TMs to be given when using the 'give' command through the Bag, but it can still be given through the 'give' command when selecting a Pokemon in the player's party. Is there a way I can make it so that the TMs can't also be given through party?

ipyQM7A.png


It most certainly does.
 
352
Posts
7
Years
  • Age 30
  • Seen Mar 10, 2022
He says I can post it, so I will now :)


Hi, this is a matter of tracking the routine that does the saving and calling it. While I don't know where it is, perhaps you can track it down if I tell you that the routine called when you hit save in the start menu is 0x6F4E8. Happy hacking!


That's the plan, if you have any routines which you would like to see, feel free to request them here.

Swapping between two possible start menus


Basically this routine will allow the player to have two different start menus. The start menu shown is dependent on a flag being set. The second one will not have a "Save" option.

How to insert:

Compile and insert into free space the following routine:
Spoiler:


Navigate to 0x6ED5C and insert the following byte changes:
Code:
00 48 00 47 XX XX XX 08
Where XX XX XX is the pointer (plus 1) in reverse hex to where you inserted the routine.
Navigate to 0x6EE42 and change 08 to 00.

Usage:
setflag 0x250 = show menu without save
clearflag 0x250 = show menu with save

That's it. It's toggled internally depending on the flag's state.

It's really good, but players will remain able to use savestates/snapshots. :/
 
352
Posts
7
Years
  • Age 30
  • Seen Mar 10, 2022
Can't really hack the emulator too. This was originally for Pokemon LIFE, so yeah, it wouldn't fit most people's needs.

I understand, but it remains useful.
I will try to make my game an executable. xD
 
Back
Top