• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    15
    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:
    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:
    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.
     
    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!!
     
    I modified the routine according to tips that jambo has given, and also I will soon post a video of it working.
     
    This is EXACTLY what I was looking for!
    This will help out a lot.
    THANK YOU. :cer_boogie:
     
    Hey, I already did this a while ago, for my own hack. Nice to see someone else do it, too.
    Although mine is more complete...
     
    Hey, I already did this a while ago, for my own hack. Nice to see someone else do it, too.
    Although mine is more complete...

    I plan to change names too, but I didnt lastly have time to look into it.
     
    Back
    Top