Author
|
Topic: Image-> Binary conversion (Read 2 times)
|
KaioShin
Guest
|
|
« on: January 08, 2008, 06:23:07 pm » |
|
How do you guys convert your title screens and other pictures you created for your projects into a format for the game? I'm having trouble with the palettes in DQM. I searched around, and apparently for converting images to GBA, the best (only?) tool is grit. It converted the tiles and the tilemap just fine too. However... I asked the author about it if I missed something. He said the problem was that the image uses 2 palettes, with 16 entries each. Some colors that were needed on all tiles were just included in both. For example the brown tents and the colored orbs get all their colors from one palette, while the text gets it from the other. Any idea how to do this? I tried fixing the palette manually by myself. It quickly became frustrating though. And the conversion tool now messed up the palette entries which tiles use somewhat too. I'm not sure what I should do now. Can anyone lend me a hand or point me in the right direction?
|
|
|
|
tomaitheous
Guest
|
|
« Reply #1 on: January 08, 2008, 06:39:13 pm » |
|
I've written an app that does something along those lines of what you're trying to do, but it's not in GBA format.
Can you post a pic of the original and your new version with the correct colors(outside the emulator)?
|
|
|
|
|
Kitsune Sniper
Guest
|
|
« Reply #3 on: January 08, 2008, 07:20:38 pm » |
|
This isn't exactly what I do, but what I'd do if I were you would be to use two copies of yy-chr. One of them has the rom, the other is a blank file which I use as a buffer.
Make sure both programs have the same palette loaded, then I import a BMP file into the window with a blank file. After that, I just select, copy, and paste from one window to the next. Since it's the same program, there's no clipboard issues at all. Simple, but functional!
After that I just hex edit the file to make sure the tilemap is correct.
|
|
|
|
Spikeman
Guest
|
|
« Reply #4 on: January 08, 2008, 07:22:57 pm » |
|
I'm also in the process of inserting a title screen into a GBA game. I think mine might be different in that it is all sprite based (SO tedious ); how exactly is the screen being displayed, via a BG map?
|
|
|
|
tomaitheous
Guest
|
|
« Reply #5 on: January 08, 2008, 09:38:15 pm » |
|
KaioShin: I'm making some assumptions. The tiles are 4bit 8x8, there is only on BG plane, no sprites, only two 16 color palettes are used, and the pics you posted aren't shifted n number of pixel for X/Y? Is it possible you can post the palette data from those two palettes entries, exactly as they are(color order) in the game palette index? The tile map data would be helpful, too.
I ran the original through my app and it created 3 (16,16,14,14) color palettes and your new one with 3 palettes (16,14,14). If I had the additional info, I could probably fit it back into the two palettes by hand.
|
|
|
|
DaMarsMan
Guest
|
|
« Reply #6 on: January 08, 2008, 09:54:03 pm » |
|
Convert it to a 16 color bitmap with xnview.
|
|
|
|
tomaitheous
Guest
|
|
« Reply #7 on: January 09, 2008, 01:40:29 am » |
|
I took a look at the savestate and reconstructed the BG0 plane from the tiles. Since I don't have the tilemap info or the palette info, you can see where the tiles from different palettes based on the "hard" edge against their neighbors, when the whole tileset it set to a fixed 16 color palette. Comparing this against the original snap shot(which is aligned correctly - thankfully), you can isolate those groups of tiles. Here's a breakdown. Palette set 1: 16 colors Palette set 2: 14 colors Palette set 2: 15 colors Palette set 4: 14 colors About 3 or 4 of the main tent tiles could be using part of the text+tent palette colors, but it's probably unlikey since you need a whole 'nother palette to represent most of the other tent tiles colors. Since you have access to the tilemap from the rom, you'll need to make the right correction for the right new tile changes. The upper part of the tent shouldn't need tile or pal index replacement, and the new lower part should use the same palette indexes as the above tiles, etc. You should probably dump the palette data so you know what order the pixels in the tiles belong in/reference to.
|
|
|
|
KaioShin
Guest
|
|
« Reply #8 on: January 09, 2008, 06:03:14 am » |
|
Thanks so far. I think you already found out, but yes, it's on a single BG plane (BG0), using two 16 color palettes. http://download.yousendit.com/6453AF4952CFAAAAI hope this was what you needed. The palette from the original game dumped directly. Then the tilemap and palette grit gave me for the edited one. The palette is pretty broken though, I think. Do you need the original tilemap too? I think it's compressed, but I could get it.
|
|
|
|
|
Tauwasser
Guest
|
|
« Reply #10 on: January 09, 2008, 12:12:02 pm » |
|
http://www.tilemap.co.uk/mappy.phpShould work. It's designed for gba too, so you don't have to edit the raw files. Also it can convert a picture to a tilemap and gfx and stuff. cYa, Tauwasser
|
|
|
|
ReBirFh
Guest
|
|
« Reply #11 on: January 09, 2008, 12:42:25 pm » |
|
I had the same problem when I tried to insert the titlescreen I made for Summoners Lineage, but I didn't know any tool that would help me so I had to do it the hard way. If you can't find a tool to help you try this:
1.Extract the titlescreen tilemap (I used unLZ-GBA). 2.Choose any color from the image you extracted and then paint the image with that color. 3.Reinsert it and run the rom, now you will be able to see the palletes that the tiles are using. 3.5 Replace the titlescreen with yours and extract it. 4.Open photoshop and make a 8x8 grid (theres an option somewhere). 5.Create 3 layers (one for the titlescreen tilemap and one for each pallete). 6.In the first layer the tilemap is probably scrambled so you will need to reorganize it. 7.Copy it to the other 2 layers. 8.Now erase the tiles that don't use their respective palletes. 9.Create two rows of 16 squares in each of the palletes layers. 10.In the first row use the color from the tilemap and in the second use the equivalent colors from the screenshot. 11.Use the magic wand to select the color you want to replace always using the pallete from the tilemap.
I Really, really, really suck when I try to explain things in english, and this was the way a noob did. I was trying to help but I don't think you will understand ( my fault) you will probably discover a much better way to do it
I'm really looking forward to this translation uou're doing a great job.
EDIT: Tauwasser Posted faster.
|
|
|
|
KaioShin
Guest
|
|
« Reply #12 on: January 09, 2008, 12:51:56 pm » |
|
Thanks everyone. I'll try the tools you posted, although I'm not sure they will work. Seems to be a problem with the way the game did these screens that creates trouble.
|
|
|
|
Celice
Guest
|
|
« Reply #13 on: January 09, 2008, 03:01:07 pm » |
|
I've always had trouble converting images to game data, save NES, and that was after recoloring the image to the converter's palette thing >.>"";; For GBA, the best thing I found was usenti. But it had the same problems as all the other programs I tried: let's say there was 16 color. After converting the image to data, I'd open the tile with YY-CHR, and now the image has 13 colors, 8 colors, 4 colors, some weird thing like that, and I'd always lose quality. The best way I got around it was manually recoloring the 16 colors different ones, so that each color was exactly distinct in color, and even then, Blues would become Reds. It's that kinda stuff which got me to stop one of my favorite projects, as inserting over a hundred of these: had to either be fully by hand, pixel-by-pixel, or after being converted and still having to be gone through by hand shadding in the colors which didn't show up.
|
|
|
|
Ryusui
Guest
|
|
« Reply #14 on: January 09, 2008, 03:39:36 pm » |
|
There's a sneaky way to do it. Dump the palette data, open up a blank file in Tile Molester slightly bigger than you need for your image, then copy the palette data (it'll look like gibberish) into the blank file. Now Import Palette/From This File and choose where you copied the palette data to (caveat: it must be in decimal, so unless you're good at converting hex in your head you should keep Calculator handy). If all goes well, you'll have successfully imported the game's palette for your use. Now you can Paste From your images into the blank file and they'll auto-convert. Neat, huh?
|
|
|
|
|