Page 1 of 2

Need Help for a 31 color image

Posted: Sun Dec 05, 2010 7:46 pm
by bastien
Hi all,

I request your help because i would like to add this image into a simple megadrive demo with gendev:

http://sega4ever.power-heberg.com/tutod ... 20misa.bmp

I use gendev (not the newest) and in my other demo i just use one palette for one image with Genitile and now for a better result i want to use 31 color + transparency ( maybe 2 plane for an highest result ? ) but i have no idea when i can make it

maybe someone can help me ?

Thanks 8)

Posted: Sun Dec 05, 2010 8:02 pm
by TmEE co.(TM)
My GFX converter can do it, but it needs you to create a 256 color image with first 32 colors in use, and 16th index (when counting from zero) must be unused on the image, otherwise you lose a color...

Posted: Sun Dec 05, 2010 8:28 pm
by bastien
ok so this can works ?:

http://sega4ever.power-heberg.com/tutod ... sa%202.bmp

EDIT: i have try with your convert but i use windows 7 and it seems QB4.5 don't work.
can you give me the converted result or another way to do it ?

Posted: Sun Dec 05, 2010 8:55 pm
by TmEE co.(TM)
I can give you the tile files (direct INCBIN) and palette files (DC.L in them). Also, 16th when counting from zero is the 17th color :P (fix the BMP, I can then do the conversion).

Posted: Sun Dec 05, 2010 9:12 pm
by bastien
shit! :lol:
so i have fixed it and it's better than other :

http://sega4ever.power-heberg.com/tutod ... 0modif.bmp

thanks :)

Posted: Mon Dec 06, 2010 8:34 am
by TmEE co.(TM)
here we go ^^

http://www.fileden.com/files/2008/4/21/ ... TEMISA.rar

GB1 is colors 0...15
GB2 is colors 16...31
and TXT is the palette values

Posted: Mon Dec 06, 2010 3:14 pm
by bastien
???
thanks but what is GB1 file format and how i include it in my code ?
i think you will give me an *.s format .

but thanks for the conversion

Posted: Mon Dec 06, 2010 6:26 pm
by TmEE co.(TM)
its a straight binary file of the tiles, ready to be INCBINed into the program... but if you're doing something in C you need some program that will convert the data into some textual stuff...

Posted: Mon Dec 06, 2010 7:09 pm
by bastien
can you just give me the pal like this exemple ? :

Code: Select all

 ---------------------------
.global misa1_pal
misa1_pal:
* ---------------------------
* size:32 bytes


* ---------------------------
	dc.w 0x0000
	dc.w 0x0111
	dc.w 0x0012
	dc.w 0x0112
	dc.w 0x0022
	dc.w 0x0122
	dc.w 0x0123
	dc.w 0x0125
	dc.w 0x0036
	dc.w 0x0137
	dc.w 0x0048
	dc.w 0x0058
	dc.w 0x0049
	dc.w 0x005a
	dc.w 0x006a
	dc.w 0x016b

Posted: Mon Dec 06, 2010 7:17 pm
by TmEE co.(TM)
Made in 5minutes in New Post :P

Code: Select all

  DC.W   0x0000, 0x0000, 0x0002, 0x0002, 0x0022, 0x0022, 0x0022, 0x0024
 DC.W   0x0026, 0x0026, 0x0048, 0x0048, 0x0048, 0x004A, 0x006A, 0x006A
 DC.W   0x0000, 0x004A, 0x026A, 0x026A, 0x024C, 0x028A, 0x028C, 0x028C
 DC.W   0x0668, 0x068C, 0x066E, 0x088E, 0x0AAE, 0x0CCE, 0x0ECE, 0x0EEE

Posted: Mon Dec 06, 2010 7:20 pm
by bastien
thanks you very much but it seems your conversion are wrong;
lot of color have the same value ...

but here is my pal result in demo :

Image

do you think i can have a better result ?

Posted: Tue Dec 07, 2010 7:30 am
by TmEE co.(TM)
This is because your original image was not correctly quantisized to MD color values, and the converter cannot know which values to create...

MD palette values calculated so are Round(ColorValue / 36), remember that the RGB channel step is 36 on MD.

Posted: Tue Dec 07, 2010 8:05 am
by Pascal
long time ago, i did a tool which splits your picture into two separeted picture (layer 1 & layer 2). Then you just have to convert them separetly with genitile.

http://www.megaupload.com/?d=0LWSD90R

but you'll need to convert your bmp to pcx

Posted: Tue Dec 07, 2010 1:02 pm
by powerofrecall
I want to try this out, but when I give it a pcx, it seems to just crash. How does the palette need to be laid out? I have colors 0 and 16 as transparent.

Posted: Tue Dec 07, 2010 1:48 pm
by Pascal
is the pcx is 256 cols ?

Your layout is correct