gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > visual HAM help

#174697 - ericd3742 - Fri Jul 09, 2010 4:52 am

I have decided to create this thread to put all of my questions in one place, and also to have a place for my future questions, instead of making a new thread every time i have a question. mostly, this thread will just be about visual HAM and other things related to it. i am very new to visual HAM, and it is very hard for me to find simple answers to my questions online. so, hopefully the nice, generous people of this community can help me out.

my first question would be "how do i use gfx2gba?". i have the gfx2gba program installed, i know how to create 256 color 8-bit images, and i know how to type things in to command prompt. the problem lies in knowing WHAT to type into command prompt to get the desired result. what i am aiming for is to get a bitmap image into a C array and a pallete ([filename]pal.c & [filename]raw.c). my main goal with this is to complete the 'aaronrogers HAM tutorial: Day 4', so that i can move on to day five. anyways, thanks in advance.

#174698 - headspin - Fri Jul 09, 2010 5:13 am

The easiest way to do this would probably be to create a batch file. Right click in Windows Explorer and select New->Text Document. Call it something like convert.bat then right click on it and select Edit.

Enter your command line and save it.

Eg.

Code:
@echo off
gfx2gba -v -m -q -fsrc -t8 -c16 picture.bmp
pause


The actual command line parameters are in the ReadMe.txt file that comes with gfx2gba.

Make sure the batch file is in the same folder as gfx2gba and your image file then double click on convert.bat.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game


Last edited by headspin on Fri Jul 09, 2010 5:16 am; edited 1 time in total

#174699 - headspin - Fri Jul 09, 2010 5:15 am

*double post*
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#174700 - ericd3742 - Fri Jul 09, 2010 5:51 am

headspin wrote:
The easiest way to do this would probably be to create a batch file. Right click in Windows Explorer and select New->Text Document. Call it something like convert.bat then right click on it and select Edit.

Enter your command line and save it.

Eg.

Code:
@echo off
gfx2gba -v -m -q -fsrc -t8 -c16 picture.bmp
pause


The actual command line parameters are in the ReadMe.txt file that comes with gfx2gba.

Make sure the batch file is in the same folder as gfx2gba and your image file then double click on convert.bat.


so if a make a .bat with your code in it (im assuming i should change "picture.bmp" to the actual name of the file), it should do exactly what i want, which is to create a pallette and a raw C array, correct? if it is then thank you very much.

*update*
never mind, im pretty sure i doesnt do what i want. by reading your post fully instead of skipping around (i am not a patient learner), i have found that you did mention "The actual command line parameters are in the ReadMe.txt file that comes with gfx2gba." i have looked there and i see codes but no instructions on how to use them, so i guess now i would like to know what codes i need to put in and what order to put them in.

#174705 - headspin - Fri Jul 09, 2010 4:54 pm

If you don't have patience then that is going to be a problem. You won't always have someone holding your hand through every process. Programming requires a lot of patience and the ability to problem solve. That needs to be extended to figuring out how to use the tools. The ReadMe.txt that comes with gfx2gba tells you the command line options you need. Follow my example putting in the various switches you need to get the output you want.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game