Batch rom trimmer for all

Discussion in 'M3 Adapter' started by fitzbean, May 24, 2007.

May 24, 2007

Batch rom trimmer for all by fitzbean at 8:45 AM (1,357 Views / 0 Likes) 16 replies

  1. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    Finally got around to making a simply/r4 batch rom trimmer.

    It trims them to the exact same size as the M3 trimmer (tested 10 or 15), and it's faster than M3's to boot; best of all of course, load up as many as you want. It drops them in the same folder that the roms were dragged from, and appends the familiar "_trim" to the filename.

    get it here.

    [​IMG]
     
  2. Pedro UK

    Member Pedro UK GBAtemp Regular

    Joined:
    Feb 7, 2007
    Messages:
    143
    Country:
    United Kingdom
    I've dl'd it and will give it a try later. Thanks buddy! [​IMG]
     
  3. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    Your program looks somewhat familiar...

    Oh yeah [​IMG]

    [​IMG]
     
  4. TLSpartan

    Member TLSpartan Kills threads

    Joined:
    Oct 20, 2006
    Messages:
    2,053
    Country:
    Australia
    His one looks more for windows though. It freezes on DSClippers(which is a great program by the way) when you do heaps of ROMS. It finishes them though but you have no idea where it is
     
  5. 4saken

    Member 4saken Retired Ace Attorney

    Joined:
    Nov 28, 2006
    Messages:
    3,358
    Country:
    Australia
    If it makes it the same size as the M3 trimmer (from what I've heard - it overtrims occasionally), will this particular trimmer overtrim?
     
  6. TLSpartan

    Member TLSpartan Kills threads

    Joined:
    Oct 20, 2006
    Messages:
    2,053
    Country:
    Australia
    I just noticed also on the screenshot it doesnt have safetrim like DSclippers.
     
  7. 4saken

    Member 4saken Retired Ace Attorney

    Joined:
    Nov 28, 2006
    Messages:
    3,358
    Country:
    Australia
    That might be because it uses the same mechanism as the official M3/R4 trimmer
     
  8. TLSpartan

    Member TLSpartan Kills threads

    Joined:
    Oct 20, 2006
    Messages:
    2,053
    Country:
    Australia
    He probaly just stole the code and branded it as his own [​IMG]
     
  9. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    it could possibly be just your computer, because I tried to trim 300 games onto an external drive with the Windows version and it didn't "freeze" up. I saw the progress for each game [​IMG]
     
  10. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    I didn't "steal any code" lol. Why would I bother if I didn't think I could make it a little better?

    What's a "safe trim"? If I had to guess, it probably just leaves a number of bytes after it determines where the game ends to make sure nothing is erased. As for "over trimming", it shouldn't. Although let know if you find a game that doesn't work.

    As for DSTrimmer - I don't like how you have to specify an output directory starting at "my computer" every time you run it; also, it doesn't show the amount & percentage trimmed for each game - and lastly, it's a tubby 3,451k and takes 15mb or so memory while SkinnyRom is a lean 145k using around 5mb.
     
  11. 4saken

    Member 4saken Retired Ace Attorney

    Joined:
    Nov 28, 2006
    Messages:
    3,358
    Country:
    Australia
    How does this trimmer trim roms? IIRC, it may either cut out a certain combination of code, or reads the header and trims to the amount specified.
     
  12. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    This starts at the back of the file and checks bytes until it finds the end of the game. It then streams the file into memory, resizes it, and saves it.
     
  13. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    so you're checking individual bytes? I did that before, and it was slow. Much faster to trim based on header info -- takes a couple seconds to trim each game. There's only a select few games that have incorrect header info (they say 0 bytes), but that's a developer issue.
     
  14. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    No argument there; what did you develop it in?
     
  15. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    I was told that the safe trim keeps an extra 188 bytes at the end of the file (184 + 4 blank) to preserve Wifi -- So far I haven't had any wifi issues using this safe trim method.

    Yes, DSClippers will not work with the few games that have incorrect header info -- they're not important games anyways [​IMG]

    I see what you're saying. How many bytes do you jump backwards at a time? Do you have a variable number based on the size of the game? I just remember that there was a trimmer that trimmed one rom at a time (no batch trimming) and scanned byte for byte going backwards -- was slow as HELL! [​IMG]

    My programs are developed in RealBasic -- since I paid for it, I figured I might as well develop multi-platform software with it! What it does is includes the necessary runtimes inside of the program, this way it doesn't require you to have something like .NET or VB runtimes -- it'll run regardless [​IMG] That's basically the reason why the size is somewhat big and takes up more memory than usual, although the size and memory isn't really an issue for many people these days.

    --Henry
     
  16. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    188 - cool, I'll have to add support for that tonight.

    Bite your tongue boy! [​IMG] Size maybe not, but memory always.
     
  17. fitzbean
    OP

    Newcomer fitzbean Advanced Member

    Joined:
    Jun 30, 2005
    Messages:
    60
    Country:
    United States
    Here's v1.1

    SkinnyRom v1.1

    -drag and drop
    -specify path to output (or have it automatically output to same directory the rom is in)
    -safe trim
    -specify appending text
    -specify byte jump
    -settings saved session-to-session via xml
    -uses unique method which involves working from the end of the file backwards, and jumping x bytes until it
    finds the end of the rom complete with double and triple checks to ensure there's never any over-trimming.
    -much fast than M3s trimmer.
    -does not use header information so this will work with ALL games.

    check out the rollover hints for brief help for most of the functions of the program

    [​IMG]

    Download it here

    If you find any games that don't trim correctly; please let me know! I'll figure out what's going on.

    Enjoy,
    Fitz
     

Share This Page