• 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.

[ASM & Hex] Changing the offset where a patch is applied

28
Posts
10
Years
    • Seen Nov 16, 2021
    Hey guys, I'm working on a hack and I downloaded a music patch because it was too much of stress trying to get sappy to work.

    The patch was the musical base by Squeetz, and it inserts data from 0x800000 to 0x8FFFFFF.

    I already have data here, so does anyone have any idea how I would go about changing where the patch is applied to?

    Thank youuuu
     
    28
    Posts
    10
    Years
    • Seen Nov 16, 2021
    Nevermind, I had an epic plan, I'm going to patch a blank rom, then copy the song table it creates. I'll paste it where I can find the space and then change the pointers from 00 00 80 08 to wherever I decide to put it instead. This should work right?
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Nevermind, I had an epic plan, I'm going to patch a blank rom, then copy the song table it creates. I'll paste it where I can find the space and then change the pointers from 00 00 80 08 to wherever I decide to put it instead. This should work right?

    I think yes, but let us know if it worked.
     
    990
    Posts
    4
    Years
  • Nevermind, I had an epic plan, I'm going to patch a blank rom, then copy the song table it creates. I'll paste it where I can find the space and then change the pointers from 00 00 80 08 to wherever I decide to put it instead. This should work right?

    I think yes, but let us know if it worked.

    Only flaw is that the actual song pointers within x800000 - x8FFFFF will be wrong.
    Though I believe @castlemurphy already solved this issue by copying existing ID's through Sappy, or something similar.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Only flaw is that the actual song pointers within x800000 - x8FFFFF will be wrong.
    Though I believe @castlemurphy already solved this issue by copying existing ID's through Sappy, or something similar.

    If they move the data then repoint the patch pointers themselves why would it still be wrong?
    wanna know for myself in case I ever need to move patched data.
     
    990
    Posts
    4
    Years
  • If they move the data then repoint the patch pointers themselves why would it still be wrong?
    wanna know for myself in case I ever need to move patched data.


    Suppose you move data to x900000 - x9FFFFF. All of the actual song pointers will be pointing to data between x800000. See the issue? Suppose a song's pointer is 80 29 81 08, and the offset x812980 has FF bytes. It'll mess up even if we move it to x900000, wouldn't it? Quoting @castlemurphy:
    I actually figured out that this would corrupt the rom seeing as the pointers for loops and everything would become mixed up.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Suppose you move data to x900000 - x9FFFFF. All of the actual song pointers will be pointing to data between x800000. See the issue? Suppose a song's pointer is 80 29 81 08, and the offset x812980 has FF bytes. It'll mess up even if we move it to x900000, wouldn't it? Quoting @castlemurphy:

    I still don't see the problem, if you know where the pointers are, why not just repoint them to the new location where the data actually is?
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    That would mean to repoint every song (256 in total), not to mention that there will be tons of data we don't even know was repointed where.

    See now that makes sense. ok last question, is there no patch log that tells what moved where, the few times I've applied patches I think a file was created with that data. I'm not very good at reading it, but I'm guessing that's what it said.
     
    990
    Posts
    4
    Years
  • See now that makes sense. ok last question, is there no patch log that tells what moved where, the few times I've applied patches I think a file was created with that data. I'm not very good at reading it, but I'm guessing that's what it said.

    I don't think patches create log files; there is IPS Checker by LSA, but that's kinda different. Only the user who created said patch can provide offsets.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    I don't think patches create log files; there is IPS Checker by LSA, but that's kinda different. Only the user who created said patch can provide offsets.

    gotcha and yeah what I was using was an ips patch. I was applying phy special split, with an ips patch and that created a log file when it was done.
    That may be the only one I've seen do that, but I haven't used many anyway and just can't remember right now.
     
    Last edited:
    Back
    Top