Extracting Textures from an NSBMD file

Discussion in 'NDS - ROM Hacking and Translations' started by cain05, Jan 28, 2012.

Jan 28, 2012
  1. cain05
    OP

    Newcomer cain05 Member

    Joined:
    Feb 15, 2011
    Messages:
    17
    Country:
    Canada
    So I finally found the file that contains the title screen used in the title loop for SaGa 3. I was able to successfully export and decompress the file but I can't seem to extract the textures from it. I tried using numerous programs but the only one that comes close is NSBMD Tool, but it still fails. If anyone can help me with this problem it would be much appreciated. Here's a link to a zip file that contains the nsbmd file in question. It has both the compressed (LZ77) and decompressed versions. Below in the spoiler tag is the error I get when I try to extract the textures using NSBMD Tool. Console Tool can display all the textures in the file (which is why I was able to find it) but it can't extract individual textures.

    http://cainsdomain.c.../0623.nsbmd.zip

    Warning: Spoilers inside!
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    I posted in a similar thread a while back http://gbatemp.net/topic/305405-texture-and-model-data-hacking/ but I felt like doing something so a little program I like to have around for this ( http://www.propl.nl/random/NSBTXExtractor.zip ).
    Some direct output from the program.
    [​IMG]

    Frankly though I am not sure what you want to do- nsbmd tool spat out numbers and such that will point crystaltile2 exactly at what you need and get it viewable. Palettes are nominally harder as it does not tell you exactly where to look but such things are easy enough to calculate between http://llref.emutalk.net/docs/?file=xml/bmd0.xml#xml-doc and http://llref.emutalk.net/docs/?file=xml/btx0.xml#xml-doc
    Back on topic in this case 0000425c houses ttl_01 which appeared to be the good stuff.
    Scanning back up from that to the TEX0 stamp brings us to the file start. Palette Data Offset is at 0x0038 for 4 bytes (NSBMDtool already told us what goes here texture to palette wise but the logic is not that different if it differed) which when fiddled gives 00024B94 which is an offset within the tex0 file rather that from the whole nsbmd start but a good hex editor should not be troubled by that (if not 40c8 plus 00024B94 is not a hard sum) leading us to 028c5c
    This brings
    [​IMG]

    I then got bored and edited it giving
    [​IMG]

    However when I tried injecting it back into the rom (after recompressing and padding the file) it kept displaying the original screen. Not sure why this is but I have seen phantom files (files that appear to be what you want but really are just there for the sake of being there) and when dealing with 3d there can be other files in the mix (I only replaced "data\field\mdl\0623.nsbmd").
    Edit- see two posts below- the game has 3d for animation and then jumps to conventional 2d apparently.
     
  3. cain05
    OP

    Newcomer cain05 Member

    Joined:
    Feb 15, 2011
    Messages:
    17
    Country:
    Canada
    I guess I wasn't doing something right in crystal tile then. I'll have another look at it, thanks for the info. As for why it doesn't display in game, there's actually two images. One is an NCGR used on the title screen while the NSBMD is used during an animation at the end of the title loop. Once again thanks for the help.
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    Ah yes I watched the whole intro and my edit appeared for a second or so- one video (apologies for the awful quality- I hosed up the encoding side of my computer and a quick and dirty grab to less than lossless motion JPEG followed by an even quicker and dirtier conversion to h264 is not conducive to such things)

    http://www.4shared.com/video/BWsIw0B1/saga3titlescreendemo.html

     
  5. cain05
    OP

    Newcomer cain05 Member

    Joined:
    Feb 15, 2011
    Messages:
    17
    Country:
    Canada
    Yep that's the one. Our graphics guy got it working now so we're good to go. Thanks a lot for your help.
     

Share This Page