LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.68k stars 211 forks source link

Ability to create my own palettes #520

Open sqrxz opened 1 year ago

sqrxz commented 1 year ago

The palettes available in the program are quite nice, as are the diferent postprocessing options and filters, but as a pixelartist I get a great amount of enjoyment out of making and trying out my own palettes, if only one slot of custom palette were available it would greatly increase my inclination to use this program. To provide well curated base palettes is very nice, but you should trust the user to do with the program what they find to be best, you never know who is on the other side.

LIJI32 commented 1 year ago

A palette editor is available on the Mac version, but currently not on the SDL version. However, the Mac palettes are compatible with the SDL version, and you can add custom palettes to the SDL version by adding an sbp file to the Palettes folder. Until the SDL version includes a palette editor, as an intermediate solution, you can manually create SBP files as they follow a simple binary format:

4 bytes: the string 'LPBS'
1 byte: flags. Should be 01 for 4-color palettes, and 03 for 5-color palettes (those have one extra color for a turned off display)
12 or 15 bytes: Color data. 3 bytes per color (R G and B), from darkest to lightest

Alternatively, you can simply append the 5 bytes of header to an ACT file (Adobe CLUT file) exported from Photoshop and it should be compatible with SameBoy.