Separate names with a comma.
Discussion in 'NDS - ROM Hacking and Translations' started by psycoblaster, Sep 25, 2008.
a failed post does not exist in a failed thread
Would help if you'd actually add some info about .chr. All I can see from that screenshot, that it's 4bpp and it's tiled. You already know that. Usually I would open an image file in a hex editor first to see what kind of other data it contains. (headers, multiple graphics, tile maps, palettes etc.)
1. Can't tell from the info you're giving whether a palette is inside the chr file or a seperate file. I know tile molester can apply a palette to the image, but I've never really worked with tile molester, so I don't know how that works.
2. Judging from those stray pixels, I guess the chr file has a header. Usually in any tile editor, you can set an offset, so you can 'push' the pixels down.
that doesn't help much either. Send me a file or two and maybe I can see what that header is for.
Ok, so I think .chr files work like this
(sorry for making it a bit of a long story):
chr files have 9 subfiles. (I can't guarantee this is for all chr files) And the header contains the lengths of the subfiles (32bit integers). The first value is 0x00600000 , it's little endian so flip the bytes and you'll realise this file is 6000 bytes long. That means the first file is at 0x24 (length of header) all and goes all up to 0x6023. (0x6024 is the next file)
This file contains an image stored in tiles.
The second file is what I call a map file, Puyo Puyo had a shitload of these and they can be quite awkward to work with if you don't know what to do with them. (Quick explanation: a map file contains the tile arrangement of an image, that's why I call them map files, because they map the tiles.) HOWEVER: apparently this game (it's Ys I presume?) hardly makes use of this, this game doesn't store its tiles "efficiently". In a tile editor, this file would appear as vertical stripes. I shouldn't talk about this too much, I can explain a lot about them, but it's not so interesting for your case.
The third file is an image again, the 4th a map file, etc. However the 9th file appears to be palette files. I recognize the values 0xFF7F (this is white) and 0xE003 (a yellow, usually used for transparent color), so I'm very sure this contains palettes.
Now back to your original question about editing these: if you want to use tile molester, I'm afraid I can't really say much about it. I'm sure it's capable of editing this particular image file, try to set the offset to 0x24 and make the window 256 pixels wide (32 tiles). Personally my approach would be making my own tile editor (simply because I don't like any tile editor that is around on the internet) and customize it for .chr files, but that I don't have anything to say on that of course .
I can't quite be positive about this but it seems that say... 0x0 to 0x23 is some unknown header, 0x24 to 0x6024 store the image, 0x6025 to 0x6624 looks similar to a NSCR file so maybe a map? and its a long shot but 0x19C24 to 0x19E24 could possibly store the palette since it doesn't match any of the other areas.
Edit: whoops, looks like someone beat me with a much better reply XD
I meant that a map file will appear as vertical stripes if you would open them in a tile editor. Besides these are horizontal your offset just isn't right.
For a 16-color palette, you need to look around the file for a 32-byte block of seemingly random data (as opposed to repetitive image data). The end of the file is a good place to start.
Once you have a guess, use Palette -> Import From -> This File, enter the offset in decimal with a size of 16, and hit OK. Keep trying different offsets like this until you one that produces the correct image.
Try reducing the canvas size so that the screen doesn't show the entire image.