What that hell it's going on with FPGEdit and 8Bits color pallete?

Started by KeiDash, May 11, 2018, 02:28:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KeiDash

Hi developers,

A recent discovering (for me part, not that I discovered) bug for BennuGD in Dreamcast port, provoques that we never will be able to free or liberate elements in the Dreamcast RAM and when you use around 14 o 15 mb of ram, the game crashed for erros like out of memory, etc.

I want to continue my game. it's no viable for me right now, make it from zero in other framework like KOS, then, one of my personal possible solition is work with 8bits FPGFiles and use 8BITS_MODE in BennuGD instead of 16BITS_MODE (between 3 ~ 4 Mb in ram of difference).

Ok, let's work. To do this I'm using:
- Photoshop CS 2016
- Corel Paint Shop Pro 9
- FPGEdit2009

Ok, let's do it begining, in my case, with Photoshop as main image editor.

1) Creating the image. It's simple, I edited the image in photoshop, something like this.


2) Convert image to 8bits color depth. I'm going to Image > Mode > Indexed color to do this.


3) Check the pallete colors. Check if the first color is black for transparency and the rest of colors are correct. Aparently, all it's correct, so I'm going to save the pallete as .PAL extension compatible with Windows colors and supposedly with FPGEdit.


4) Ok, let's go to FPGEdit to create a new FPG file with 8bits for BennuGD and the pallete that I was created in Photoshop



And then (ERROR:PAL not contains 256 colors)...Wops! The .PAL file created with Photoshop it's not compatible?


5) Ok, no problem...Let's try to do the pallete on Corel Paint Shop Pro. Open the image with all colors and palete applied


6) I going to load the PAL generated with Photoshop on the image. All it's correct (apparently..)



7) And then, I'm going to save the .PAL file to use late on FPGEdit


8) Ok, the final try! Load this new palete on FPG edit.


9) OK NO ERRORS HERE BUT...WHAT HAPPENING AT THE COLORS?


Al blue colors was replaced for brow colors, but only in FPGEdit. On Photoshop or PSP the pallete has the correct colors...

I don't understood anything about this. Someone can help me please?


panreyes

I would recommend you using old DIV2's FPG creator for that purpose (8 bit palleting).
Maybe DIVDX will also do the trick :)

JaViS

Working on Anarkade. A couch multiplayer 2D shooter.

KeiDash

Thanks for your fast reply. I downloaded Smart FPG Editor and looks better.

I'm going to try it.

Regards,

Drumpi

Be careful, because I think that FPGEdit (at least, the 2005 version) can only read FENIX PAL formats, and maybe some old versions of some painting program (I don't remember if Paint Shop Pro, Photoshop or Corel Draw... yes, that old!).

Also, you can create a 16bits FPG, add your image, save it, clone the FPG, and convert it to 8bits. That way it will give you the option to generate a Bennu PAL file.
So as a trick, put all your images that share the same palette on the same file, create the PAL file or just save it as 8bits FPG. Then create a new FPG and use that PAL or 8bitsFPG as a palette, and put your individual images into the new FPG.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

KeiDash

Quote from: Drumpi on May 12, 2018, 12:37:06 AM
Be careful, because I think that FPGEdit (at least, the 2005 version) can only read FENIX PAL formats, and maybe some old versions of some painting program (I don't remember if Paint Shop Pro, Photoshop or Corel Draw... yes, that old!).

Also, you can create a 16bits FPG, add your image, save it, clone the FPG, and convert it to 8bits. That way it will give you the option to generate a Bennu PAL file.
So as a trick, put all your images that share the same palette on the same file, create the PAL file or just save it as 8bits FPG. Then create a new FPG and use that PAL or 8bitsFPG as a palette, and put your individual images into the new FPG.

Perfect! I can do it with this and works perfect on PC and Dreamcast (pheeww....)
This is the best mode that I try to make a 8bits fpg files compatible with Bennu. If this is hopefull for someone, this are the steps.

1) Create new 16Bits FPG file in FPGEdit2009
2) Add a unique png file with all colors that you will use in the rest of png files. This png file should be a, 256 indexed color depth with all colors include the black colors.
3) Go to menu and convert it as 8 bits fpg file and save it.
4) Go to menu FPG > Export fpg resources. Select Microsoft PAL and the name as name


5) Now, create a new 8bits FPG file using the pallete that you just saved and check it.

6) Include all separated images for this fpg file with the same pal, 256 indexed colors depth and all should and all it's gona be all right
7) Now in bennugd code, set the color depth as 8bits like this


set_mode(640,480, MODE_8BITS);
fpg = load_fpg("/cd/8bitsfile.fpg");
pal = load_pal(/cd/8bitsfile.pal");


Nothing more :-)

Thanks all for help me in this issue