• 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

BluRose

blu rass
811
Posts
10
Years
Aight, this request is similar to shinyquagsire's berry selection screen...
I need an asm which can show the party screen and on selecting the pokemon, exits and stores data in a var...
However theres a twist, im not talking about special 0x9f...
The mons need to be read from Ram where PSS stored the mons... So now y'all get it why its so complex...
If that is to be pulled off, it'd be amazing;)
legit take the routine for special 0x9F
replace the part where it accesses your party with the new ram address. this likely just involves replacing an address from the routine, literally nothing more. callasm the new special and ezpz
 

Wesley FG

Pokémon Kalos Advance !! Gba Hack
338
Posts
15
Years
Someone can convert it for EM ?

Change the order that badges appear on the trainer card (untested)
Simply makes the loop read from a lookup table before checking for the badge.
Spoiler:
 

BluRose

blu rass
811
Posts
10
Years
Someone can convert it for EM ?
Code:
.align 2
.thumb
    
@ 00 4B 18 47 XX + 1 XX XX 08 at 0x0C4684 (080C4684 via r3)
hook_name:
    asr r7, r0, #0x10
    add r1, #0x11
    adr r0, order_table
    ldrb r0, [r0, r7]
    add r1, r1, r0
    ldrb r0, [r1]
    ldr r3, return
    bx r3
    
.align 2
return: .word 0x080C468C + 1

@ Change the badge order using this table (reverse order)
order_table: .byte 7, 6, 5, 4, 3, 2, 1, 0
here you go
 
112
Posts
8
Years
  • Age 27
  • Seen Mar 15, 2024
Is it possible to alter the breeding mechanism in FR? Having the egg be only be the mother's species and inherit moves from only the father is limited.

I'm thinking of the egg having a 50% chance to be either species instead, so that male only pokemon would still breed normally, and egg moves would be possible for them as well.

Would probably be much better than the regular one IMO.
 
Last edited:

Wesley FG

Pokémon Kalos Advance !! Gba Hack
338
Posts
15
Years
Code:
.align 2
.thumb
    
@ 00 4B 18 47 XX + 1 XX XX 08 at 0x0C4684 (080C4684 via r3)
hook_name:
    asr r7, r0, #0x10
    add r1, #0x11
    adr r0, order_table
    ldrb r0, [r0, r7]
    add r1, r1, r0
    ldrb r0, [r1]
    ldr r3, return
    bx r3
    
.align 2
return: .word 0x080C468C + 1

@ Change the badge order using this table (reverse order)
order_table: .byte 7, 6, 5, 4, 3, 2, 1, 0
here you go


i test and not work
 
19
Posts
8
Years
I have a request:

So FireRed's egg move table only accounts for 8 egg moves. My hack, Pokemon Vega Minus, is obviously derived from the original English translation of Vega by Dr. Akimbo. The problem is, egg moves are busted in both my hack and his because in Vega, Pokemon have anywhere from 15 to 37 egg moves.

So I was able to fix it somewhat by replacing the 0x9 at 0x0456AC with 0x30 (just an arbitrarily large number), and then fixing the limiter at 0x045CC4, but since the amount of RAM allocated to egg moves only can account for ten moves without overflowing, I'm worried this could result in glitches.

In this thread, FBI explains how to fix the crappy way the game checks for egg moves using ASM, except since I know nothing about ASM, it doesn't make any sense to me. Apparently it's simple for people who do understand ASM though, so if anyone could help me out it'd be great. You can go download my patch for reference if needed. I'd also need to know how to implement the ASM into the game.

Thanks in advance.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
i test and not work

I just tested it, and it does.

1) Copy the routine and paste it in a .txt file, change the order however you want and give the file an easy-to-remember name.

2) Pass it through HackMew's thumb.bat

3) Grab the compiled routine from its .bin file and paste it in an offset that ends in 0, 4, 8 or C and that also has free space in your ROM.

4) Go to the offset 0C4684 and Paste-Write (Ctrl+B) this:
Code:
00 4B 18 47 XX XX XX 08
XX XX XX = Pointer to the offset+1 where you've inserted the routine.
Example: I've put it in E3CF80, then I'd replace XX XX XX with 81 CF E3.

5) Test.
 

Wesley FG

Pokémon Kalos Advance !! Gba Hack
338
Posts
15
Years
I just tested it, and it does.

1) Copy the routine and paste it in a .txt file, change the order however you want and give the file an easy-to-remember name.

2) Pass it through HackMew's thumb.bat

3) Grab the compiled routine from its .bin file and paste it in an offset that ends in 0, 4, 8 or C and that also has free space in your ROM.

4) Go to the offset 0C4684 and Paste-Write (Ctrl+B) this:
Code:
00 4B 18 47 XX XX XX 08
XX XX XX = Pointer to the offset+1 where you've inserted the routine.
Example: I've put it in E3CF80, then I'd replace XX XX XX with 81 CF E3.

5) Test.


i know compile and insert asm routines, and i test it again and not work,
you can post the hex compiled bin generate for you:
for my it:

07 14 11 31 03 A0 C0 5D 09 18 08 78 00 4B 18 47
8D 46 0C 08 07 06 03 02 05 04 01 00

and not work, you really check it ?
 

BluRose

blu rass
811
Posts
10
Years
i know compile and insert asm routines, and i test it again and not work,
you can post the hex compiled bin generate for you:
for my it:

and not work, you really check it ?
to be honest i don't understand why this would even be necessary; just replace the graphics if it's really not working for you, although i regrettably inform you that i think lunos is right as i also tested it myself, so... yeah
 

Wesley FG

Pokémon Kalos Advance !! Gba Hack
338
Posts
15
Years
to be honest i don't understand why this would even be necessary; just replace the graphics if it's really not working for you, although i regrettably inform you that i think lunos is right as i also tested it myself, so... yeah

you change some badge of position, for test ?
i change the 5th with 3th (for use surf after 3 gym)
and 6th with 4th (for use fly after 4 gym)
and my changes no have any efecct, the badges apppear in the same order
 
Last edited:

BluRose

blu rass
811
Posts
10
Years
you change some badge of position, for test ?
i change the 5th with 3th (for use surf after 3 gym)
and 6th with 4th (for use fly after 4 gym)
and my changes no have any efecct, the badges apppear in the same order
this has no effect on how the badges are awarded, in what order in the game's story, or which badge awards which move. this solely affects in which order the badges show up on the bottom of the front side of the trainer card
 

Wesley FG

Pokémon Kalos Advance !! Gba Hack
338
Posts
15
Years
this has no effect on how the badges are awarded, in what order in the game's story, or which badge awards which move. this solely affects in which order the badges show up on the bottom of the front side of the trainer card

yes i understand all, i change the order of 3 badge with 5 badge, and no have effect in game.
the badges are same original positions.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
you can post the hex compiled bin generate for you
07 14 11 31 03 A0 C0 5D 09 18 08 78 00 4B 18 47 8D 46 0C 08 05 04 07 06 01 00 03 02
Order: 5, 4, 7, 6, 1, 0, 3, 2

Also, I'm seeing that you have an empty space after that 00, delete it.
x6Q1rFm.png
 
Last edited:
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
Here's kind of a silly routine I made for fun.

Custom Vs. Seeker Pedometer [FR]

This will let you change the amount of steps needed to activate the vs. seeker. You can make it step-independent, increase or decrease as the game progresses, or have some random fluctuations, or anything you like.

It requires 2 bytes of free RAM. JPANs save block hack is needed to allow the pedometer to save. The first byte will hold the pedometer value, and the second will hold the 'charged up' limit. When the pedometer reaches this value, the vs. seeker is usable, and then reset upon use.

To change the required steps, just set your second RAM byte to whatever you like. This can easily be done in XSE. Just be sure to set the limit when the player receives the item.

Note: I'm not sure if this is an existing Vs. seeker feature or not, but using it even when there are no trainers are around resets the pedometer. Although from a logical standpoint this makes sense regardless.

Now, for the routines! There are two of them you will need. (insertion instructions in comments of each routine)

First: Change Vs. Seeker Routine to Check our new Pedometer
Spoiler:


Second: Increase pedometer each step (you will have to merge with the hp loss/gain each step routines)
Spoiler:
 
21
Posts
10
Years
  • Age 32
  • Seen Nov 5, 2021
Hello,

I know this is something which has been requested by others before, but I would like to request a way to store the current hp of pokemon being deposited in the pc storage system.

This would allow us to control any way in which a pokemon can be healed.

Spoiler:


I don't know enough asm to evaluate how hard this would be to implement, but it would be a very good function to have, as it would allow a lot more flexibility with the kind of game-play changes you could implement.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Hi, I wanted to make a request. I don't know if it's simple or not but I hope it is.
I'd like an ASM Routine for Fire Red, that checks a Pok?mon in your party and returns 0x1 in the var 0x8004, if it's an egg. Would that be possible?

I'm basically thinking in a script that forcefully hatches an egg.
Right now, if someone decided to make such a routine, I imagine that it could be used like this:
Code:
special 0x9F // Pick a Pok?mon
waitstate
callasm 0x8XXXXXX|0x8XXXXXX+1 // This would check if the Slot that the Player picked in the special 0x9F is an egg or not, and if it is, it would set to 0x1 the Var 0x8004. 
compare 0x8004 0x1
if 0x1 goto @hatch

#org @hatch
special 0xC2 // Hatch the egg
 
Last edited:

Squeetz

ROM Hacker
191
Posts
10
Years
(...) returns 0x1 in the var 0x8004, if it's an egg. Would that be possible?

There is actually already a special in Firered that checks if what you chose is an egg or not.
Usage:
Code:
(...)
special 0x9f
waitstate
compare 0x8004 0x6
if 0x4 goto @cancelled
special2 0x800d 0x147 - this is the special
compare 0x800d 0x19c - check if egg
if 0x1 goto @itsanegg
(...)
 
Back
Top