Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

We’re on social media!

Research & DevelopmentGot a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Research & Development programs in this forum are subject to moderator approval before they are displayed.

So lately I have been thinking aboout how to edit sprites of rival in the fire red intro depending on the gender of player. After a while of reaserch I managed to do it. Although I dont like a few things about that code it works and doesnt seem to cause any harm to the ROM. So here are the routines

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77

Is this your first piece of ASM (or close to)?
It could be written better, but very well done on getting it to work.

Things which could definitely be improved:

Spoiler:

Code:

ldr r4, .BOY
; These two were in dissasembly of original code, I didnt played with them
mov r1, #0x60
mov r2, #0x40
;Comparision
cmp r3,r4
bne girl

Should simply be:

Code:

mov r1, #0x60
mov r2, #0x40
cmp r3, #0x0
bne girl

The loading of 0x0 into r4 for comparison is wasteful, when you can simply compare r3 with 0 like I have above, this also nullifies the need for the push of r4 in the code. You only need to load something into the register to compare if the thing you want to compare with is unknown at compile time (the number is known in this case) or if the number you wish to compare is larger than 0xFF. Otherwise, simply use cmp rx, #0xZ to compare register x with byte Z.

The way that bl (or blx as you call it) work with the gba games is annoying:
The way to use it properly is this:

Is this your first piece of ASM (or close to)?
It could be written better, but very well done on getting it to work.

Things which could definitely be improved:

Spoiler:

Code:

ldr r4, .BOY
; These two were in dissasembly of original code, I didnt played with them
mov r1, #0x60
mov r2, #0x40
;Comparision
cmp r3,r4
bne girl

Should simply be:

Code:

mov r1, #0x60
mov r2, #0x40
cmp r3, #0x0
bne girl

The loading of 0x0 into r4 for comparison is wasteful, when you can simply compare r3 with 0 like I have above, this also nullifies the need for the push of r4 in the code. You only need to load something into the register to compare if the thing you want to compare with is unknown at compile time (the number is known in this case) or if the number you wish to compare is larger than 0xFF. Otherwise, simply use cmp rx, #0xZ to compare register x with byte Z.

The way that bl (or blx as you call it) work with the gba games is annoying:
The way to use it properly is this:

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77

Always nice to see new ASM hacks by new people. But maybe you should upload a video or something of it working.

Also, I think once you've become a bit better with THUMB, you may be able to just rewrite the whole routine and make it WAY smaller. Maybe even fit in to the old routine and save a bunch of space. Good luck!!

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.