Don't use DSLazy or R4 Trimmer to trim roms!!!

Discussion in 'NDS - Flashcarts and Accessories' started by ShortFuse, Feb 6, 2007.

Feb 6, 2007
  1. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    Hey guys.

    I wrote the DS-X Manager. It should work with all carts. I just called it DS-X Manager because I bought a DS-X and posted it on the DS-X Forums. It's fully compatible with all those other carts. In fact, the new version v0.3 will be released as NDS Manager but it's mostly just a name change.

    This is why DS-X Manager's trimming is different:
    Every rom has a set point for where the data ends. It's in the header. The trimmer I wrote writes up to that point. After that, there's 4 bytes of blank space, followed by 184 bytes the WiFi data. If you trim roms by just using the ROM Size and don't take into account the wifi you'd break download play (and maybe something else) on the carts that support it.

    I've been developing this application originally for the DS-X

    You can find a link to it here
    http://forums.ds-xtreme.com/showthread.php?t=1050

    It basically works for any DS cart that uses FAT but since the DS-X was the first one I got I based it around that. The new version i'm writing (v0.3) will be renamed to NDS Manager because it'll be able to support any NDS Flash Cart that uses a FAT file system (including the microSD ones). It supports reading within RAR files and ZIP files and extracts them automatically and includes the option to trim on copy. It also allows creating a library for quicker access to your files.

    Latest versions are:
    v0.2.6.1 (beta) (trim/zip/rar support)
    v0.2.4 (stable) (trim/zip)

    If you are using 0.2.6.1 be sure to include the ICSharpCode.SharpZipLib.dll and unrar.dll also on the forum's page.
    Again, this WILL work for other carts besides DS-X if it uses a drive folder (ie: "E:\")

    Included here is a screenshot of version 0.2.5 though there have been some changes with the revision to 0.2.6.x
    [​IMG]

    I developed a method for trimming which is safer than dslazy's method (or R4 since they copy dslazy's method). Already people on the forum have claimed that issues they had with trimming using R4's trimmer (issues such as white screen / crashing) didn't happen when trimming using DS-X Manager.

    I have made a stand-alone for the trimmer and called it NDS Trimmer. It is open source and has been ported to C and well as C++. It is available here:
    http://forums.ds-xtreme.com/showthread.php?t=1964
    On that thread, there is already a win32 version, mac os x (universal build). it has already been compiled for even AmigaOS and some have already compiled it for use on linux systems.

    Here a repost of the reason why I released the source code:
    What if the last file is a sprite uses color#16 (in the palette) twice in a row (0xFF) for the last few bytes? What if it's an audio file with silence at the end (0x00)?

    And then I later learned that the wifi data comes after the rom size and DSLazy / R4 Trimmer could be trimming that data.
    FF and 00's are values (0x00 = Null, 0xFF = 255) and the other method could be erasing data which, as I said could crash/break your game.


    Download here:
    DS-X Manager v0.2.4
    DS-X Manager v0.2.6.1 (dll's included)
     


  2. aristo

    Newcomer aristo Advanced Member

    Joined:
    Dec 20, 2006
    Messages:
    71
    Country:
    South Africa
    WOW!
    Excellent work!!

    I will wait for your NDS Manager...
    It will be the MUST HAVE utility for all the NDS cart user around the globe!

    Keep up the good work!
     
  3. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    It'll just create an "apps" folder with the cart you have (because that's how the DS-X works) but it should work fine with the cart you have now.
     
  4. bfoos

    Member bfoos GBAtemp Fan

    Joined:
    Dec 5, 2006
    Messages:
    328
    Location:
    Upstate, NY
    Country:
    United States
    Sounds nice, but could you possibly provide a link that doesn't require forum registration to download?
     
  5. Dirtie

    Former Staff Dirtie :'D

    Joined:
    Sep 9, 2003
    Messages:
    3,705
    Location:
    Zealer
    Country:
    New Zealand
    Wow, nice work indeed. All the current clients that automatically trim should use this method.
     
  6. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    Done, i re-edited my post
     
  7. bfoos

    Member bfoos GBAtemp Fan

    Joined:
    Dec 5, 2006
    Messages:
    328
    Location:
    Upstate, NY
    Country:
    United States
    Thanks. I hate to be a pain, but I mostly interested in seeing the stand alone trimmer.
     
  8. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    you don't need to register to see the source code for the stand alone trimmer.
    i'll put up a rapidshare link to the win32 and mac os x builds
     
  9. outphase

    Member outphase Custom title

    Joined:
    Nov 21, 2005
    Messages:
    1,218
    Country:
    United States
    I like the cross post. I use v2.0 myself to stream zipped files on linux.
     
  10. magikalfly

    Newcomer magikalfly Member

    Joined:
    Dec 7, 2006
    Messages:
    42
    Country:
    ShortFuse, I have a question. I tried your manager. I've been using bodom child's trimmer with no problems yet.

    "Look here, a little program I've done :

    http://www.playeradvance.org/forum/showthread.php?t=5293

    http://weburn.net/nds/DS%20Trimmer.rar

    The readme is in french, here's how it work :

    Launch the program DS Trimmer, select your roms, drag & drop them in the little window, and wait a few second smile.gif

    All the trimmed roms will be in a folder named "Roms trimmées".

    Enjoy smile.gif"

    However, your manager gives different trimmed sizes. Some games, it seems the DSX manager results in a smaller file than bodom's trimmer. Any clue as to what's going on? People have been using both trimmers with no problems so what's with the file size discrepancies?
     
  11. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    i don't know how bodom's works so i can't really say. at least bodom's is not over trimming but i guess there's more that can be trimmed. the problem arise when you overtrim.

    dslazy/r4 trimmer use what's more of a guessing strategy (maybe bosom's does too) while DS-X does calculations based on the rom header's info
     
  12. cory1492

    Member cory1492 GBAtemp Maniac

    Joined:
    Jun 23, 2005
    Messages:
    1,488
    Location:
    Home, WhereElse?
    Country:
    Canada
    You'd think the programmers who are clever enough to make these devices work would be clever enough to simply read the header defines from ndstool [​IMG]

    At any rate, as you say with the wifi data (I think this is what you are saying at any rate) it is technically safer to not trim any ROM even to the header sizes as there is a slim possibility of vital data outside the defined ROM area/inside the unused space.
     
  13. kirra

    Member kirra GBAtemp Regular

    Joined:
    Jun 11, 2006
    Messages:
    117
    Country:
    United States
    bodom child's trimmer has been great, its simple to use and does a great job. I highly recommend it. I didn't like the bulky interface of the DS-X Manager.
     
  14. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    nintendo wifi download play key or w/e it is, comes 136 bytes (186 was a typo but eh, what's 50bytes) after certain roms. we found this out on the ds-x forum when mario kart's download play didn't work. i put all roms to append 186bytes to the filesize just in case. i mean, what's 186bytes. a tenth of a KB
     
  15. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    yeah, that's the problem is the new beta. it isn't a easy to use as v2.4 which is mostly why i still label it beta. it's all over the place.
     
  16. kev3458

    Member kev3458 GBAtemp Regular

    Joined:
    Sep 19, 2006
    Messages:
    214
    Country:
    Canada
    Will the saves still work when you trim a rom but use the untrimmed rom's save? Sorry, kinda new to this [​IMG]
     
  17. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    no difference at all.
     
  18. GSBS

    Newcomer GSBS Newbie

    Joined:
    Jan 19, 2007
    Messages:
    9
    Country:
    United States
    So I assume gameplay shouldn't be altered in any way because of your discoveries? [​IMG]

    I really love the interface for mass trimming and knowing the amount of room all the games will take up on my card once trimmed. Really helps if you are cramming (like most trimmers are.) What are the odds we can see a GBA counterpart to this? Flash Advance Tool is the standard (I believe), but this UI is so much more efficient.
     
  19. - Wrath of God -

    Member - Wrath of God - God

    Joined:
    Nov 8, 2003
    Messages:
    975
    Country:
    United States
    Hmm.. when transferring roms to the card, some kind of progress bar would be nice. Also, an option for renaming roms couldn't hurt. And I'm not sure if this is implemented, but the option to transfer existing saves.

    Just some suggestions. Good job otherwise.
     
  20. ShortFuse
    OP

    Member ShortFuse GBAtemp Regular

    Joined:
    Nov 17, 2006
    Messages:
    127
    Country:
    United States
    yeah the transfer bar broke in the beta release but the final (stable) has it.
     

Share This Page