batch processing??

Discussion in 'GBA - Flashing Hardware and Software' started by blainy, Jan 22, 2010.

Jan 22, 2010

batch processing?? by blainy at 11:44 AM (690 Views / 0 Likes) 4 replies

  1. blainy
    OP

    Member blainy GBAtemp Fan

    Joined:
    Nov 1, 2008
    Messages:
    381
    Location:
    australia
    Country:
    Australia
    ok, so i cant remember the name of the program i used (gbata? or something like that) but it wasnt what i wanted it to be. it would only let me do single files at a go, rather than select a folder of roms to process..is there anything i can use that has a batch processing feature?? i know NDStokyo trim will batch process sram patch and trim gba, but i have a few roms with damaged headers (75 or 100ish) and would like to be able to do this in one go, rather than having to open each rom individually..
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    You might have to make a batch file to do it manually ("dir /b >>listoffiles.txt" before playing with your chosen batch file making method of choice sort of thing) but have a command line app that should do what you want:
    http://www.gbadev.org/tools.php?showinfo=78
     
  3. blainy
    OP

    Member blainy GBAtemp Fan

    Joined:
    Nov 1, 2008
    Messages:
    381
    Location:
    australia
    Country:
    Australia
    damn, i was hoping for a program with a gui to let me just click a folder, select an option for what to do to the files, and tell it to process, rather than having to write scripts n stuff...could you give me a little more of an idea o f what you are talking about exactly?? possibly show me an example batch file that could do this?
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    edit: while the method below should work it appears as though it will parse for just *.gba, run it with "gbarm -v *.gba"

    I recall doing something like this before around here but I am way to lazy to go digging through my old posts.

    Have all the files you want in a directory (you can have them in a tree but it just makes life that little bit more difficult).

    Open a command prompt.

    Dir is the command to list the files in a directory, adding the switch /b means only the file names are displayed rather than the other stuff that is usually displayed and adding the switch >>a.txt means it will output the command to a text file called a.txt

    With this list of files (note it will also include a.txt in that list so make sure to delete it).

    Now what you do is up to you, I normally grab a spreadsheet app here as the fill options work wonders for tasks like this.

    Now GBARM

    CODE===============================================================================
    GameBoy Advance ROM Manipulator (GBARM) 1.0 by CREDO/SCS*TRC^RESOURCE
    Copyright (C) 2001 Black Box, Success and The Ruling Company, Resource
    ===============================================================================
    Syntax:ÂÂ GBARM filename.ext or filename.ext , etc
    Switches: -h - help
    ÂÂÂÂÂÂÂÂÂÂ-i - detailed ROM header info
    ÂÂÂÂÂÂÂÂÂÂ-v - validate ROM header
    ÂÂÂÂÂÂÂÂÂÂ-p[] - pad filesize to the next exact power of two or given size
    ÂÂÂÂÂÂÂÂÂÂ-f - change the filler byte used by the -p command (default $ff)
    ÂÂÂÂÂÂÂÂÂÂ-t - change the 12 ASCII chars long game title
    ÂÂÂÂÂÂÂÂÂÂ-c - change the 4 ASCII chars long game code
    ÂÂÂÂÂÂÂÂÂÂ-m - change the 2 ASCII chars long maker code
    ÂÂÂÂÂÂÂÂÂÂ-u - change the hexadecimal main unit code
    ÂÂÂÂÂÂÂÂÂÂ-d - change the hexadecimal device type
    ÂÂÂÂÂÂÂÂÂÂ-n - change the hexadecimal mask ROM version number
    Examples: GBARM -v gbarom.gba -p -t'GBA ROMZOR' -cAGRP -m1R -f5a -u6b -d5c
    ÂÂÂÂÂÂÂÂÂÂGBARM gbarom.gba /V -p400000 -U00 /tGBAROMZOR -m'1R' -i -n01

    There is also a readme that is even better but long story short
    "GBARM -v gbarom.gba" is the command you want.

    It is an in place app which is nice I guess, it does also mean backups are an idea.

    Still the GBARM -v part needs to be in one column, drag and fill until you have enough to cover your files.
    Place the file names in the second column, depending on how you have them named (spaces in the name) you may need to stick " on either side of the name of the files you got in the first step.


    Take the two columns and past them into a word processor. Where the column line once was there is now a "tab" spacing, copy this and do a find/replace (typically ctrl and h) to replace the tab thing which you will need to paste in the find box with a space.
    Let it do it and save with the extension .bat

    Make sure the .bat and gbarm are in the same directory as the .gba files and double click the .bat file. It should run and sort your files out, I am quite impressed that you have that many bad headers- is it all homebrew or something?
     
  5. blainy
    OP

    Member blainy GBAtemp Fan

    Joined:
    Nov 1, 2008
    Messages:
    381
    Location:
    australia
    Country:
    Australia
    thanks for that man, i will be sure to try it when i have a chance. as for havign that many bad headers, yeah, i do have a bunch of homebrew stuff that doesn't seem to play fair, and a few scene releases that also don't work consistently, and periodically show the garbled logo on the gba startup screen when i use my 3in1+, so im assuming its a header issue. would it be worth my while backing up my data and formatting my memory card first to see if that helps at all?? or is the method you described the only option to fix the consistency of the loading screen actually loading and not hanging with the garbled text?
     

Share This Page