how can i extrac images from a rom?

Discussion in 'NDS - ROM Hacking and Translations' started by RaffaeleAldrigo, Jun 30, 2012.

Jun 30, 2012
  1. RaffaeleAldrigo
    OP

    Newcomer RaffaeleAldrigo Newbie

    Joined:
    Jun 30, 2012
    Messages:
    4
    hello i want to extract all the images from megaman starforce 3 red joker

    i tryed dslazy but i have .bin files... how can i do? (i'm noob)
     
  2. deishido

    Member deishido Texture Modder

    Joined:
    Jul 8, 2009
    Messages:
    205
    Location:
    Indiana
    Country:
    United States
    http://www.sprites-inc.co.uk/forum/showthread.php?t=7687

    google is your best friend ~
    First post has info on how to use the bin files
     
  3. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    There are two main methods of extracting images from roms

    Emulator VRAM ripping
    Run the rom in an emulator (savestates may also be used but ignore that for now)

    ROM decoding
    On the DS this takes two forms
    1) Actual format decoding
    2) SDK formats

    Format decoding is the subject of every hacking tutorial worth reading. Most of the time it revolves around figuring out how the graphics are encoded which usually means learning how the hardware works and moving from there. However most things stick closely to the hardware so give or take compression you can use a tile editor ( http://filetrip.net/f23649-CrystalTile2-2010-09-06.html and https://code.google.com/p/tiledggd/ being two of the better ones although I suggest the former for the time being). Note that the vast majority of images are made up of tiles (small usually squares like if you drew an image on graph paper) and use palettes (the images themselves are just lookup values for the palette which holds the actual colours- it is how games have you fight several slightly different coloured enemies over the course of a game) so you will also have to find the palette.
    Finding the palette can be tricky (it is usually named the same as the graphics file or something similar) but if you are truly pressed or it is just quicker fire up an emulator and it will usually have the option to dump the palette (desmume certainly does).
    There is also mapping where a game will arrange tiles in an order but most of the time you can piece it together by eye if you have to. I did not see anything there but read on.

    SDK formats. As developers and their artists do not want to have to learn about how the hardware works Nintendo (and sometimes other companies) made a bunch of formats (first five from http://llref.emutalk.net/docs/ are the most common). Crystaltile2 can parse these as can the likes of tinke, oil of vitriol and loads of other tools. I did not see any evidence of these formats though.


    Of course several games have used the 3d hardware and 3d models despite being a 2d game (New Super Mario Brothers is all 3d as far as sprites go for instance).
    I looked at the game and did not see anything immediately apparent but I took a look at models.bin and it appeared to be an archive format. First thing I see in it is BMD0 which is the sign of a 3d model in the NSBMD format. It started with 11 as well which says compression (easily sorted).

    Sample of models.bin header
    0000000000 00001F60 80007DC4 ...`..}.
    0000000008 00005AF4 80006828 ..Z...h(
    0000000010 0000797C 800084C4 ..y|....
    0000000018 0000B9DC 80006878 ......hx
    0000000020 0000D8F0 80006898 ......h.
    0000000028 0000F898 80006828 ......h(
    0000000030 00011780 80006888 ......h.
    Format of models.bin appears to be
    32 bits is file location
    Next 32 bits is something (I thought size but was wrong) although there is an 8 at the start for reasons unknown. This goes for 1003 entries but the last one has no size value (no 8 either) and appears to point to the end of the file. Files seem to be end to end so that is nice.
    No file names or anything I can see. For an example I did manage to pull out
    [​IMG]
    Looks pretty simple, I trust you know about 3d texturing and how that works (if not see something like a zbrush tutorial). I did not take ndsmbdtool or nsbtxextractor very far yet.


    Edit something- all sorted, carry on
    I can provide you with a batch file to extract all the files properly
    XXXXXX Ignore this
    but I have to eat first. If you can live without the extensions for the files (I do not think they are all NSBMD files as there were fewer BMD0 values than there are entries/files) I can give you the batch file now.
    Edit- some files seem to be uncompressed and others are not what I first though (most are nsbtx or nsbmd though).
    Edit2- I think I might have screwed up in a big way and the second value is not size at all. New version should spit out files properly
    Edit3- if you are using an old version without any extensions replace it with the current one
    XXXXXX
    Go to http://crackerscrap.com/ click projects get filecutter, you want the filecutter.exe file.
    Go to http://code.google.com/p/dsdecmp/ and get the download there, you want the dsdecmp.exe file.
    Copy and paste the following codebox into a text file and save it with the extension .bat
    Put the exe files, models.bin and the batch file in the same directory and double click the batch file. Wait about 30 seconds depending upon the speed of your machine (when the batch file finishes it has finished) and a bunch of files with appropriate extensions will be made.

    batch file to extract from Megaman Starforce 3 Red Joker models.bin
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    Haha double post- In case you missed it I revised my opinions and made a shiny new batch file to dump everything.

    I got really bored and advanced RSI to about tomorrow as onset of the nasty stuff. Still dumped all the textures that were easy to dump from what I saw the ones missed were mainly flames and sparks and air effects) from the files with http://filetrip.net/nds-downloads/utilities/download-nsbtxextractor-10-f29535.html and a massive batch file.

    nsbtxextractor batch file

    [​IMG]
    [​IMG]
    [​IMG]
     
  5. RaffaeleAldrigo
    OP

    Newcomer RaffaeleAldrigo Newbie

    Joined:
    Jun 30, 2012
    Messages:
    4
    FAST6191 i need the maps not 3models...
    it seem difficult *.*
     
  6. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    Sorry when you said images I assumed you meant sprites and such. By the I took a further look and it seems fieldobj.bin has a few of those. Also motions.bin seems to house several animations for the 3d models if you wanted those as well.
    [​IMG]
    All are packed and mostly compressed again

    Maps, assuming you do not mean tile mapping data, also known as backgrounds to most of us are usually a function of the game to create (although it might be the case here if the game uses 3d models the levels might also be 3d for some of it) so it might be better here for now to grab them with a map/BG view from an emulator.
    [​IMG]

    Still I did look at http://www.sprites-inc.co.uk/forum/showpost.php?p=308294&postcount=65 which says things could happen (said thread also has many of the sprites). Most of the archive files appear to be in a fairly similar format to those already covered (it also appears the 8 at the start of the second entry would indicate compression with the rest of it being uncompressed size.
     
  7. RaffaeleAldrigo
    OP

    Newcomer RaffaeleAldrigo Newbie

    Joined:
    Jun 30, 2012
    Messages:
    4
    FAST6191
    plese explain how can i extract maps please!
     
  8. RaffaeleAldrigo
    OP

    Newcomer RaffaeleAldrigo Newbie

    Joined:
    Jun 30, 2012
    Messages:
    4
    please help
     
  9. StorMyu

    Member StorMyu "I'm too old for this"

    Joined:
    Jan 2, 2010
    Messages:
    892
    Country:
    France
    Read the wall of text instead of asking questions.
    Everything is already said, just think 2 seconds.
     

Share This Page