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

[EM] hex values and free space

JordanB500

Former Pokemon League Champion
104
Posts
16
Years
  • so i was going through my roms and i tested a patch that i made some time ago which i had to reconstruct from a fixed offset back to a dynamic base simply because the offset i used caused sound problems and in extreme cases caused the entire city of petalburg to disappear therefore i wanted to be sure of which offset to start my dynamic scripts from? so i looked thru the standard emerald rom with HxD and found that from 0xDE4020 to 0xE3C540 is 00 bytes not FF bytes so i am wondering since there is so much of it, is it safe to convert to free FF bytes? all without expanding the rom? or do i use 0xE3CF80? till the end of the rom?
     

    SuperSalty64

    SuperSalty
    5
    Posts
    3
    Years
    • Seen Jul 11, 2020
    Curious about this myself since I am trying to establish a base for a ROM to use to start hacking while implementing CFRU/DPE (along with the recommended additions per CFRU's documentation) for Pokemon FireRed, and trying to understand the best way to utilize the ROMs free spaces while implementing these scripts (that is, trying to understand the best way to apply DPE --> recommended script --> recommended...etc.).

    In response to the original post, however, I would highly recommend looking into getting FreeSpaceFinder (can't post the link since I'm still under five posts, but it should be available in the Resources section of this the ROM Hacking thread), which will be able to open up your ROM and point you to the offsets in it that are free to use.
     
    1,591
    Posts
    10
    Years
    • Seen Mar 20, 2024
    so i was going through my roms and i tested a patch that i made some time ago which i had to reconstruct from a fixed offset back to a dynamic base simply because the offset i used caused sound problems and in extreme cases caused the entire city of petalburg to disappear therefore i wanted to be sure of which offset to start my dynamic scripts from? so i looked thru the standard emerald rom with HxD and found that from 0xDE4020 to 0xE3C540 is 00 bytes not FF bytes so i am wondering since there is so much of it, is it safe to convert to free FF bytes? all without expanding the rom? or do i use 0xE3CF80? till the end of the rom?

    Some of those 00 bytes are free space, but others aren't and should be left unchanged. If you want to be completely safe you can just use the space between 0xE3CF64 and the end of the ROM, as that's all unused 0xFF bytes. That said, according to this post some of the 00 bytes can be used if you really want to.

    Also, there's no downside to expanding the ROM; even though some old tools can't work with memory addresses after 0xFFFFFF, you can just reserve all the free space before that for those tools and put any "big" data in the expanded half.
     

    JordanB500

    Former Pokemon League Champion
    104
    Posts
    16
    Years
  • all of the ways in which im capable of expanding the rom end up doubling the size to 32 megabytes is there a way to choose the filesize?(To be honest there is more then enough space for my needs but i may want extra space in case i want to add more)
     
    990
    Posts
    4
    Years
  • all of the ways in which im capable of expanding the rom end up doubling the size to 32 megabytes is there a way to choose the filesize?(To be honest there is more then enough space for my needs but i may want extra space in case i want to add more)

    Honestly 32 MB is enough for a hack; there should be no need for more. But once the wise Lunos said that the GBA movie cartridges have 64 MB. So you can ask the creator of some movie cartridge about this.
     
    1,591
    Posts
    10
    Years
    • Seen Mar 20, 2024
    all of the ways in which im capable of expanding the rom end up doubling the size to 32 megabytes is there a way to choose the filesize?(To be honest there is more then enough space for my needs but i may want extra space in case i want to add more)

    You could do that with a hex editor; copy a chunk of the ROM that's the size of the extra space you want, paste it at the end of the 16MB ROM, then overwrite the new space with 0xFF bytes. Unless you've got an expanded Pokedex you probably won't need to expand the ROM at all though; there's almost two megabytes of free space, and that's more than enough for most things.
     
    Back
    Top