Offlinelist and pretrimmed roms

Discussion in 'NDS - Flashcarts and Accessories' started by Richy Freeway, Mar 27, 2008.

  1. Richy Freeway

    Richy Freeway GBAtemp Advanced Fan

    Oct 9, 2006
    Just discovered offlinelist, looks like a handy tool for organizing my roms.

    Problem is I've trimmed all my roms already and offlinelist wont recognise them.

    Is there anyway round this?
  2. hankchill

    hankchill I Pwn n00bs.

    Nov 5, 2005
    Outer Space
    Use Rominator.

    Hyuk hyuk [​IMG]

  3. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    United States
    As hankchill says rominator relies on other methods but if you want to use offline list you will have to work out what was done.

    There are two types of trimming: the so called safe/header offset based method and the method I will dub brute force.

    The former reads the DS rom header which says where the file ends and then deletes from there on while the brute force method reads back from the end until it gets to something other than a 00/FF (which is all the trimmed data is) and deletes from there.
    Sometimes this causes problems so that is why the other method was developed.

    In theory it should be possible to just add 00/FF's back to the rom and restore the crc32 and by extension offline lists capability but when someone tried this it did not work for some reason. I was posting in the thread but that probably does not help searching much and it was buried in amongst several hundred other "how do I trim roms threads".
    A simple method might involve using copy /b to add a whole bunch of 00's/FF's to the rom and then trimming it back to the size required (which with something like cracker's filecutter: could be accomplished very rapidly with the command line and a batch file or three:
    Assuming all the files are extracted sort them by size. With the possible exception of pokemon roms no rom should be smaller than the next size down. For the record DS roms come in 64Mbit, 128Mbit, 256Mbit, 512Mbit, 1024Mbit and 2048Mbit aka 8, 16, 32, 64, 128 and 256 MBytes)
    Sort them into size folders
    the line dir /b >>a.txt will make a text file of just the names of the rom in the folder
    open this in a spreadsheet and using different cells and the fill option make it read something like
    copy /b romname+blankfile romname2 (this will make large files)
    then use the trimmer app, the usage is:
    filecutter length file.out
    I will leave it up to you whether you do the trimming after the copy or later
    rinse and repeat for all the sizes.
    I suggest putting something like a # or some other symbol you will not use where you want a space and rememeber to put quotes around names with a space in them (you might as well do it for all though)

    Copy the spreadsheet into a text editor and replace the "tab" parts (you will most likely have to copy and paste a "blank/tab" section) with nothing and the symbol with a space.
    Save as a batch file and you are sorted.

    You probably could accomplish this with a more complex batch file using wildcards and/or info but I am ashamed to say my command line skills leave a bit to be desired these days. Likewise you could use the dir a bit better and do it all in one, the switch is /s to parse subdirectories as I recall.