#111587 - blackcoat - Fri Dec 08, 2006 1:22 am
Though the FAQ points to the vast library of tools available for converting images to a format useable by the DS, is there any standard tool (or set of tools) used by people here in the community?
I ask because I am just starting my first homebrew project, and I am a bit stumped with what should be a simple image conversion. As with a few other people, I too am following Patatersoft's tutorial to help get me started. The first part of the tutorial teaches you how to display background images in Mode 5. For the images, Patatersoft suggests using gfx2gba (manual) -- which is different than the identically named gfx2gba -- and then using his hConvert tool to set the alpha bit for the DS. The resulting object file can be run through the `bin2o` rule in devKitARM's "base_rules" makefile and linked.
Long story short, when I do this, I get a black screen on top and on bottom. Interestingly enough, my code does work since I can run Patatersoft's pre-generated .bin files through `bin2o`, link them, and the backgrounds show up. My own images seem to be the problem, and here is what I am doing right now:
Run the .raw.c through hConvert to set the alpha bit.
hConvert only takes a single filename as an argument and has no options, so this should not be a useage issue. I'm guessing that my problem could be one of the following things:
So, what works for you? How do you get your backgrounds on to the DS? Any tool suggestions + command line options would be greatly appreciated.
I ask because I am just starting my first homebrew project, and I am a bit stumped with what should be a simple image conversion. As with a few other people, I too am following Patatersoft's tutorial to help get me started. The first part of the tutorial teaches you how to display background images in Mode 5. For the images, Patatersoft suggests using gfx2gba (manual) -- which is different than the identically named gfx2gba -- and then using his hConvert tool to set the alpha bit for the DS. The resulting object file can be run through the `bin2o` rule in devKitARM's "base_rules" makefile and linked.
Long story short, when I do this, I get a black screen on top and on bottom. Interestingly enough, my code does work since I can run Patatersoft's pre-generated .bin files through `bin2o`, link them, and the backgrounds show up. My own images seem to be the problem, and here is what I am doing right now:
- Crop the original .gif file using GIMP, and producing two 256x192 .bmp's with indexed color.
- Convert all .bmp's to .raw.c with gba2fx. From my makefile:
Code: |
${DATA}/%.bin: $(ART)/%.bmp
gfx2gba -q -fsrc -o$(BUILD) $< |
hConvert only takes a single filename as an argument and has no options, so this should not be a useage issue. I'm guessing that my problem could be one of the following things:
- I am not using gfx2gba correctly.
- hConvert doesn't set the alpha bit correctly, giving me a transparent images (black screen) instead of something opaque.
- I have not properly saved my image with GIMP. It should be noted that I have not figured out how to adjust color depth in GIMP, but I did opt for a 256-color palette when switching to Indexed color and saving the .bmp's.
So, what works for you? How do you get your backgrounds on to the DS? Any tool suggestions + command line options would be greatly appreciated.