Editing custom NES palettes in Linux

So I’m curious if there’s any feasible way to edit .pal files in Linux, specifically of the sort used by Nestopia for its custom color palette option. While I was able to edit .pal files using the standalone Nestopia’s built-in palette editor in Windows, I’ve found that the Linux version of Nestopia is missing that specific feature. And thus far, I haven’t been able to find any usable alternatives even after hours of searching. It’s evidently possible to edit the files directly using a hex editor, but I honestly can’t make heads or tails of that method.

Have you tried using anything via WINE? Windows Nestopia should work fine through it, and I imagine other emu tools, as well. Native would be better, of course, but it might work in a pinch.

Because I currently don’t have direct internet access on my computer (i.e. programs and all the code libraries required to run them have to be manually downloaded as .deb packages through another device and transferred to it), I honestly hadn’t tried installing Wine because I figured it would require a ridiculous number of extra libs to work, but now that I try it out anyways just to see, I find that it just gives an error, saying that it just plain cannot be installed without actually giving any explanation why. Strangely, I had this same issue last night when attempting to install a couple of libs to allow me to compile another NES emulator from source (to see if it had a palette editor). I wonder if there’s been some sort of update very recently to the way Ubuntu packages work that makes them incompatible with my computer.

e: To clarify, the version of Linux I’m running is Linux Mint 18.

I tried a couple of palette editors and none of them worked in WINE but the Windows build of nestopia seems to work okay with it. But yeah, WINE requires a ton of dependencies, so I can see how that wouldn’t be particularly helpful.

A small update now that the forums are back up: I did figure out the problem with setting up those .deb packages, which was the usual deal with missing dependencies, except the only way I could get the system to tell me that was by accessing the packages via command line and forcing them to install, which of course means that I would then have to uninstall each package because of the missing dependencies.

So I have to wonder if there’s a way to get the system to mock-install .deb packages just so one can determine what the missing dependencies are, since the –no-act, –dry-run and –simulate parameters in dpkg all do precisely nothing.

Hi @Claus_Contraption,

You can edit NES .pal files with GIMP easily:

  • rename file extension to .data
  • open file in GIMP, use default RGB image type with a width of 16 and a height of 4 (or any equivalent combination you like, as long as it equals 64 pixels)
  • click open to show the palette, use ctrl+shift+j to zoom the image to your window size
  • when done, go to File -> Overwrite foo.data
  • rename back to .pal and use with nestopia like normal

Hope this helps.

1 Like

Thanks so much, @anon90536803. It seemed really strange to me that not even GIMP could make use of these files, but it turns out that all this time, I essentially just needed to change the file extension. Such a simple yet illusive solution. :+1:

1 Like