Color Palette Fix for Pokemon GBC Games. #1
Replies: 2 comments 1 reply
-
|
Thanks for mentioning what you discovered! I'll review this and correct the function. I have done no testing with rom hacks specifically, but I did test with the SDL demo and can see clearly the color issue. What is a little confusing is that I am not seeing this issue with my esp32-s3fn8 implementation, which is where I do primary development of the project. The function to convert color is only called when a palette entry is updated, so typically the speed of this conversion is not a bottleneck. |
Beta Was this translation helpful? Give feedback.
-
|
I'm delighted to hear about it! It was my hope others could benefit from the project. I'm developing the esp32-s3fn8 version on the m5stack Cardputer. This issue you mentioned should be fixed in the latest release. The red channel was not in the wrong position; the issue was that the green channel expansion was being applied before isolation, which caused green bits to spill into the red channel. The fix was to extract each channel first, then perform the 5→6-bit green expansion in isolation before placing the channels into RGB565: In my SDL build this resolved the color issues matching perfectly with existing screenshots for Oracle of Seasons |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Stumbled onto this fork when trying to get peanut setup with my ESP32-S3 and attempting to run a ROM hack of Pokemon yellow that converted the game into GBC color palette. When it launched it didn't look right. Tried the same thing with Gold, and Crystal, and there were still issues with the palette. To make sure I wasn't going crazy I tried on the windows .exe you put out and ended up running into the same palette issues there. In debugging I found that the BRG555 to RGB565 conversion was off. In bgr555_to_rgb565_accurate: (c & 0x001F) << 11 places red in the RED position instead of the BLUE position, so adjusting the conversion tweaks the color palette.
This adjustment fixed the color palette for Static Yellow (Hack), Crystal, and Gold.
In purple is the palette before the conversion change. Orange skies is after.
Beta Was this translation helpful? Give feedback.
All reactions