extract sprites directly from rom's files

Discussion in 'NDS - ROM Hacking and Translations' started by y2pablo, May 24, 2010.

  1. y2pablo
    OP

    y2pablo Newbie

    Newcomer
    5
    0
    May 24, 2010
    France
    Hey i wanted to know if there was any way to get the sprites directly from the rom's files with out tacking screen shots of the the sprites and pasting it in paint to remove the back ground. So if anyone knows how to do it can you tell me please and on some sprite sheet i see they have unused sprites again can if some one knows how to rip sprites directly from the roms files please tell me.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,549
    9,377
    Nov 21, 2005
    I do not know how far you have gone into sprite making, rom hacking and graphics theory so I will try and keep this relatively simple.

    First screen shots means emulator and if you have one like desmume you can use the various viewers to spit out your sprites in a sprite sheet friendly way (you did not think most sprite makers chose the lime green or pink backgrounds for no reason did you?).
    Although it does not have the nice pink background like some other roms here is an example with the homebrew game POWDER and the tile view: http://pix.gbatemp.net/32303/spriteripdemo12375.jpg (the OAM viewer is even better for most games).
    Unused (assuming in this instance you do not mean things that were cut from the final game but left in the code but things like death animations you might not normally see) sprites can also often been seen in the memory as well.
    Do note that these viewers may not apply a given palette at a given time so it may look odd until you find the right one (it is actually a shot from a tile editor but it has what I am talking about http://pix.gbatemp.net/32303/lozdemo.JPG ).

    After this you are in the realms of proper rom hacking- the DS SDK does have sprite formats (technically general image formats), a basic description (and more importantly common extension names).
    http://tahaxan.arcnor.com/index.php?option...ult&lang=en
    Pulling apart roms like this is a way to get those "unused" (as in axed from the final build) sprites you mention.
    Of course these files can be found within sub files (narc/carc files often house entire tile, palette and layout data) as well as see compression (a carc file is a almost always a compressed narc file). Tools like crystaltile2 have reading ability for these files (I did a basic guide in the rom hacking documentation about halfway down this post http://gbatemp.net/t73394-gbatemp-rom-hack...t&p=1221059 ) along with a few others.
    The end results can be almost exactly what you want http://pix.gbatemp.net/32303/gundam2.JPG

    All this being said developers are not bound by Nintendo to use their formats and indeed many developers do use their own. Often they are just tile in a file you can scan through and see with a tile editor (the DS uses the same formats as the GBA so if your tile editor does not mention DS but has GBA you should be safe). Going slightly off on a tangent but some of the compression applications for the GBA (remember the same formats thing from earlier- it carries over somewhat into compression) have tile viewers built in as well- http://www.romhacking.net/ has a bunch.

    I have also seen the developers of DS games use the 3d engine for what amounts to 2d sprites on the screen (platform games are great fans of this as it can make for fluid motion, high detail and things like shadows without having to crack the whip over your sprite artists for 5 years). We do have 3d tools for the DS of varying quality though (a screenshot http://pix.gbatemp.net/32303/phantdemo1.PNG and an application: http://www.romhacking.net/forum/index.php/topic,8407.html )

    That is not to say you have to use one or the other- if I want to use an emulator to rip a music track that does not play until the end of a game I will instead hack the music file to play said song instead of say the title screen music. Even if the developers are not using nintendo formats in a game the format will usually be consistent so you can instead make the final boss appear as one of the starting characters/enemies and the like. It can get a bit troublesome if you want to say replace a single tile giant rat with a 10 tile boss monster but it is usually worth a go (not all games will be quite as nice but if you pull apart new super mario brothers most characters (OK 3d in this case) will be in one directory).
     
    Tomato Hentai likes this.
  3. y2pablo
    OP

    y2pablo Newbie

    Newcomer
    5
    0
    May 24, 2010
    France
    sorry if i say this but i didn't realy see where it says how to get the sprites directly from the rom but i got the program console tool i open a file in it but i was all weird numbers and letters
     
  4. Mana94

    Mana94 GBAtemp Regular

    Member
    276
    0
    Jul 12, 2009
    United States
    So I'm assuming that you have no experience whatsoever.

    Well, sprite hacking and removing isn't as simple as "open it up and they are right there". You have to go through the palettes and do a whole lot of things that I am not about to explain...
    Wait for a professional to rip it or ask someone who knows what they are doing.
     
  5. rastsan

    rastsan 8 baller, Death Wizard,

    Member
    996
    228
    May 28, 2008
    Canada
    toronto
    What game are you trying to rip sprites from?
    Even then try tahaxan first, you will if possible see any easy to get to sprites or any picture information, that isn't in the above mentioned special formats and it will let you save them. If you cannot see any in tahaxan then you need to study up or hope someone will help you.
    So in any case what game, and more info please?
     
  6. y2pablo
    OP

    y2pablo Newbie

    Newcomer
    5
    0
    May 24, 2010
    France
    i'm trying to rip sprites from Kateikyoushi Hitman Reborn DS Flame Rumble X (J)(Caravan)
     
  7. Lyan53

    Lyan53 Member

    Newcomer
    24
    1
    May 11, 2010
    France
    France
    Sorry at all for my very bad english laguage [​IMG]


    Honestly, without knowledge NDS ROMHack, that is going to be difficult

    Pour être honnête , si tu n'as aucune notion de ROMHack NDS , ça va être difficile



    The data of this game are in 2 pack files:

    - sound_data.sdat (sounds & soundtracks)
    - filedata.bin (font, graphism, palette, tilemap, scripts etc...)


    Les données du jeu sont répertoriées dans 2 fichiers archive :

    - sound_data.sdat (sons & et musiques du jeu)
    - filedata.bin (polices d'écritures , graphismes , palettes de couleurs , tilemaps , scripts etc ...)




    In first, It would be necessary to develop an extractor for the filedata.bin to extract all files in this package file

    Dans un premier temps , il faudrait coder un extracteur pour le fichier filedata.bin afin d'en extraire le contenu (pour ça faut savoir coder aussi :/ )



    In the filedata.bin, there is a standard format NDS file or relatively similar (NFTR, NCGR, NSCR, NCLR?? etc...), but still it is necessary to know these formats and which is their utility.

    Dans le fichier filedata.bin , le format des fichiers sont relativement proches des standards généralement utilisés dans les ROM NDS (NFTR , NCGR , NSCR , NCLR ?? etc ...) , mais en revanche il faut connaitre ces formats et savoir à quoi ils servent puis surtout comment ils fonctionnent d'où les notions de ROMHack impérativement nécessaires pour parvenir à extraire les graphismes de ce jeu .



    See ya all [​IMG]
     
  8. Kostilaks

    Kostilaks Advanced Member

    Newcomer
    63
    6
    Jul 5, 2017
    France

    hello friend. I need your help. I cant find the pm. so you can u please pm me? its about something that haunts me from the age of 8. i
    hello friend. I need your help. its about something that haunts me from the age of 8. there is a hidden game over in LUCKY LUKE SNES. I asked a lot of people about it but no one ever find it. I even searched google but nothing. I remember playing it and losing a lot of times to the part where you need to gather all the indian pieces before it gets dark. after losing many times instead of showing lucky luke in the bed (the normal game over screen) it showed lucky luke with dizzy eyes. I never found that secret again. I don't know if this really happened or it was a dream. but I have been searching internet for many ages. I asked a lot of people but no one knows anything. a friend told me that it could be a glitch that made the game show an unused game over screen. so my question is how can I "read" the contents of a snes rom?
     
  9. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,549
    9,377
    Nov 21, 2005
    I am not much of a SNES hacker. Still
    SNES ROMs are not unpacked in any way like DS games, or games that came on CD or floppy disc or something like that. They are all one file. This has upsides and downsides.

    There is no mention of it on https://tcrf.net/Lucky_Luke_(SNES) , however if it was not a bug or something but a rare event then it might not be as that site is more for things which did not appear in the final game.

    The easiest way to extract something from a game is if you can see it or do it in said game, and then work backwards from there. This however sounds like it is hard to have happen so you can not as easily do that. There are things you might look for here -- if it is a game over screen but a rare one then the normal game over screen sequence should have a check which fails before going to the thing which shows the final screen.
    ...
    I think an example of the above might do. You are playing Mario. You hit an enemy. In your head you know the rules of mario but the computer will run the same checks every time (do you have a star, is the location one which kills the enemy, do you have a mushroom/flower, are you small...). In this case the game will check if you ran out of life or whatever and then display game over, however before it goes to the normal screen it will hopefully check something else. This something else is what you want to look at. Hopefully it is that simple and does not have, if I am allowed to mix and go back to mario, one for time, one for hazards, one for poison mushrooms, one for pits, one for getting trapped on a scrolling level and so on and so on.

    The SNES does not have the most memory so things tend not to just sit in memory where you could see it with an emulator. You might get lucky with a normal tile viewer if you open the ROM and press page down a lot.

    After this comes elimination and softer methods. If you have determined a given section is for sound then it is overwhelmingly likely that the thing you seek is not in the sound section, eliminate any text, eliminate the level layouts, eliminate whatever else is not what you seek and you start getting very few places to look. Alternatively the game is probably not going to do anything different for one screen -- if you figure out the sorts of locations graphics are in then the one you seek is probably going to be right next door to it.

    Other than load an emulator and view maps/tiles and open in a tile editor and press page down a lot then none of those are something I would be happy to tell someone new to ROM hacking to do. If you already know a bit of hacking then they are not so hard to learn.
     
    Tomato Hentai likes this.