• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Development: Changing Fire Red intro rival sprites/names and texts depending on players gender

tinix

PearlShipper & C Programmer
86
Posts
14
Years
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

Branching routine to be inserted at 0x131248:
Spoiler:


Actual code that modifies the behaivour:
Spoiler:


Next thing Im going to look into are names.
Video:
 
Last edited:

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
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:


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:

Spoiler:


A pain? Yes. But it works.

Hope this helps, and well done on finding and creating a solution for yourself!
 
Last edited:

tinix

PearlShipper & C Programmer
86
Posts
14
Years
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:


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:

Spoiler:


A pain? Yes. But it works.

Hope this helps, and well done on finding and creating a solution for yourself!

Thank you for pointing out these things. It is my first working ARM/THUMB ASM program/hack (played with x86 a bit) I will try to fix those things.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
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!!
 

tinix

PearlShipper & C Programmer
86
Posts
14
Years
I modified the routine according to tips that jambo has given, and also I will soon post a video of it working.
 
Back
Top