• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

[Other] editing rom in-game

  • 39
    Posts
    9
    Years
    • Seen Jul 29, 2018
    hey guys. i am wondering if it is possible to change the content of the rom via asm in-game.
    basically what i want to do is to change the base power of an attack halfway through the game. that means something like an upgrde to an attack that can be called via script.
    is that possible? i mean, rom stands for read only so i guess there is no way to do that but maybe someone knows more?
     
    It's possible to hijack the number as its being read or applied. I tried it before with limited success (I increased the power of cut as you got more badges). I found the tricky part to be displaying the increase in the status screens. It doesn't change the actual ROM data just the stored/in-use RAM version... Or something like that.

    But I'm sure someone more competent at ASK than myself could manage it!
     
    It's possible to hijack the number as its being read or applied. I tried it before with limited success (I increased the power of cut as you got more badges). I found the tricky part to be displaying the increase in the status screens. It doesn't change the actual ROM data just the stored/in-use RAM version... Or something like that.

    But I'm sure someone more competent at ASK than myself could manage it!

    This actually sounds quite cool, I never thought of increasing the base power of a move throughout the game. This would be perfect for my hack where a move is learned by everyone and I don't want it to do too much damage early but then I want it to be viable late becaue it's a strong move with a lot of potential.
     
    I've never thought of that, it really does sound cool. By the way, to clarify what Mana had in mind. You can find the part of the ASM code that gets the base power from the attack data table and then hook on to it (basically, replace it with a b opcode or something). Then, in your code, you can check if the move is the one you want to change, then check the flag/variable and load a different value based on that (use the original code if it's not that). Of course, the only downside is that you've got to modify the routine every time you want a move to change. Maybe you could use a table if you're going to do it for a lot of moves.
     
    You can write a simple asm routine that is meant to load data to rom area in ram after address 0x8000000. Nevertheless, the load instruction to an address above 0x8000000 could be "banned" by the way hardware works. I know this is impossible to do in GBC but GBA hardware might support it.

    You should do some googling and try to find notes about GBA hardware to see if this is possible or just write an asm routine that corrupts the rom part of ram area in some way.

    P.S
    A better way for doing what you're looking for is to modify the asm routine looking for the base power of the used move and check there if that specific move is used and "you're half way in the game", change power of the move to something else. This wouldn't involve changing contents of rom when the game is run.
     
    I found a nice workaround.
    1. expand move table
    2. add a new move with the same name as the move you want to upgrade but with the upgraded stats
    3. write an asm routine that replaces the old attack with the new one
    This will look like an upgrade but it actually is a completely new move.
    The downside is that you have to cycle through every pokemon the player has caught and that may slow down the execution of the routine. I solved it by presenting this feature as an "upgrade machine" where the player can select a pokemon and the routine will apply to that specific pokemon.
     
    hey guys. i am wondering if it is possible to change the content of the rom via asm in-game.
    basically what i want to do is to change the base power of an attack halfway through the game. that means something like an upgrde to an attack that can be called via script.
    is that possible? i mean, rom stands for read only so i guess there is no way to do that but maybe someone knows more?

    I feel like there is a small knowledge gap here which needs to be addressed. The ROM is indeed Read Only Memory, and you cannot change the contents of the ROM during normal emulation\play. ASM cannot change the contents of the ROM mid emulation either.

    The game is programmed in C, and with our disassemblers we are able to see each individual ASM instruction of the program. ASM hacking is essentially overwritting/adding/changing more ASM instructions change the way the default program is executed.

    All of these questions about "Is X possible" I find are very silly. It's almost always going to be possible. The only limit is hardware, and your personal abilities. You should ask:
    "Is this going to take up more RAM than I have?"
    "Does this require something the GBA doesn't have? (700 color images, touch screen, 80x80 OAMs)
    "Do I have enough ROM space? (32MB limit, but you can exceed that if you break console support)
    "Do I have the skills to make it happen?"

    If the above questions is yes, then it's possible. Normally the question is about feasibility, rather than possibility. For example, if I REALLY wanted 80x80 sprites for battle, I could theoretically have 4 stacked 64x64 OAMs to make one. I can definitely do this, and it's never going to come near the GBA's limitations. Is it feasible though? Definitely not. I'd have to change how the battle code works, OAM deletion for my customized 80x80 sprites need to be reworked, basically it's a large overhaul of work (that and you'd have to take the time to make these 4 64x64 images).

    So to finally answer your question, yes, it is possible. And to answer the important question, yes, it is feasible (and quite easy).


    I found a nice workaround.
    1. expand move table
    2. add a new move with the same name as the move you want to upgrade but with the upgraded stats
    3. write an asm routine that replaces the old attack with the new one
    This will look like an upgrade but it actually is a completely new move.
    The downside is that you have to cycle through every pokemon the player has caught and that may slow down the execution of the routine. I solved it by presenting this feature as an "upgrade machine" where the player can select a pokemon and the routine will apply to that specific pokemon.

    That's unneeded work. Just put a hook at the display and move damage fetcher to make filter for your move. Adding filters for more than one move is just as easy too. I don't really like the "duplicate" method too much as it takes more space than needed and definitely more work than needed.

    There's some information about this in the ASM help thread. I once helped Mana with a similar problem.

    You can write a simple asm routine that is meant to load data to rom area in ram after address 0x8000000. Nevertheless, the load instruction to an address above 0x8000000 could be "banned" by the way hardware works. I know this is impossible to do in GBC but GBA hardware might support it.

    You should do some googling and try to find notes about GBA hardware to see if this is possible or just write an asm routine that corrupts the rom part of ram area in some way.

    P.S
    A better way for doing what you're looking for is to modify the asm routine looking for the base power of the used move and check there if that specific move is used and "you're half way in the game", change power of the move to something else. This wouldn't involve changing contents of rom when the game is run.

    You cannot write to ROM in GBA either with ASM instructions. The PS part of your post is the best way to tackle this problem :)

    ROM is Read Only. You can't modify the ROM in game.

    Ding Ding Ding! Someone knows what ROM stands for lol.

    EDIT: Tons of grammar errors. I ain't got time to go back and fix. If something is unclear ask :P
     
    Back
    Top