Need Help for a 31 color image

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Need Help for a 31 color image

Post by bastien » Sun Dec 05, 2010 7:46 pm

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)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Dec 05, 2010 8:02 pm

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...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Sun Dec 05, 2010 8:28 pm

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 ?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Dec 05, 2010 8:55 pm

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).
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Sun Dec 05, 2010 9:12 pm

shit! :lol:
so i have fixed it and it's better than other :

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

thanks :)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Dec 06, 2010 8:34 am

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
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Mon Dec 06, 2010 3:14 pm

???
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

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Dec 06, 2010 6:26 pm

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...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Mon Dec 06, 2010 7:09 pm

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

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Dec 06, 2010 7:17 pm

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
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Mon Dec 06, 2010 7:20 pm

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 ?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue Dec 07, 2010 7:30 am

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.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Tue Dec 07, 2010 8:05 am

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

powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Tue Dec 07, 2010 1:02 pm

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.

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Tue Dec 07, 2010 1:48 pm

is the pcx is 256 cols ?

Your layout is correct

Post Reply