Decreasing rom size?

Discussion in 'Discussion and Q&A Archive' started by MASTERestlib, Sep 11, 2011.

Thread Status:
Not open for further replies.
  1. MASTERestlib

    MASTERestlib Well-Known Member Member

    Joined:
    Apr 1, 2010
    Messages:
    167
    Location:
    In my room, drawing mah art.
    I couldnt find any other section to put this in exactly because its not much sonic related but more related to all roms.


    How do i detect and delete any excess empty space in the end of a rom to decrease its size? (Dont post answers like winzip or winrar because i have my reasons for asking a question such as this)


    Trash if topic is incorrect in any way.
     
  2. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    You have to disable ROM padding. Rating by your wish to reduce the size, I'm guessing you already did this, but it's always worth mentioning it. You do this by removing a certain line in build.bat, requesting the program ROMPAD.EXE to, well, pad the ROM for you.


    If, however, you still have any extra wasted space that does not come from padding, I can't really help you until I see excactly how your ROM looks like.
     
  3. MASTERestlib

    MASTERestlib Well-Known Member Member

    Joined:
    Apr 1, 2010
    Messages:
    167
    Location:
    In my room, drawing mah art.
    im not talking about sonic rom hacks. im talking about roms downloaded from the internet like socket that may have empty space in the end.
     
  4. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    lol


    I don't know, all I can think of is Zipping it.
     
  5. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    Maybe I'm missing something obvious, but you just open the ROM with a hex editor, go to the end, and if there's any empty space/padding at the end, then delete it.


    Though you may need to fix the checksum afterwards.
     
    Last edited by a moderator: Sep 13, 2011
  6. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    Just editing the build.bat then putting a REM before the rompad.exe will solve the problem.
     
  7. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    For the record, ROM padding is generally needed (not necessarily for hardware or emulation's sake), but some flash cart software may require it (or at least require some form of cleaning of the rom before dumping), my one for example refuses to write the end of the ROM if not padded correctly, say the ROM is 90356, the software may only write 80000 unless padded to 100000.


    As far as I know, no emulators require the rom is to be padded, however, most emulators do have ZIP support, I recommend as mentioned before to either ZIP the rom or open with a hexadecimal editor and physically search for the end padded section and remove.
     
Thread Status:
Not open for further replies.