6 minutes
Custom Palettes and Logo for the Open DMG Display
TL;DR
- CSV user palettes: NAME,C1,C2,C3,C4 (see my_user_palettes.csv)
- CSV auto palettes: NAME,C1,C2,C3,C4,GAME_ID (see my_auto_palettes.csv)
- Logo image: Best 160x144 PNG (see my_logo.png)
- Upload like firmware via USB bootloader
- Link to the scripts
- Example calls
odd_custom_palette.py my_user_palettes.csv my_user_palettes.bin
odd_custom_palette.py -id my_auto_palettes.csv my_auto_palettes.bin
odd_custom_logo_generator.py my_logo.png my_logo.bin
uf2conv.py -c -b 0x10190000 -f RP2XXX_DATA -o my_auto_palettes.uf2 my_auto_palettes.bin
uf2conv.py -c -b 0x101B0000 -f RP2XXX_DATA -o my_user_palettes.uf2 my_user_palettes.bin
uf2conv.py -c -b 0x101B8000 -f RP2XXX_DATA -o my_logo.uf2 my_logo.bin
Introduction
The Open DMG display (hereafter referred to as ODD) comes with basic palettes and a custom logo, which are both directly compiled into the firmware. One way to modify these is by changing the data within the code and recompiling it. However, not everyone is comfortable with this approach. Therefore, the firmware also supports the use of external palettes and logos. To make it easier to create the required external data, I wrote a few Python scripts, which I will introduce in this blog post.
Palettes
The ODD differentiates between two types of palettes, which are also stored separately. There are user palettes, which are intended to be manually chosen by the user during operation. Additionally, there are automatic palettes, which are automatically chosen when a specific game is detected.
User palettes
The user palettes are simple datasets that consist of a name (using only ASCII characters) and four 24-bit colors. Using the “odd_custom_palette.py” script, you can generate the binary data that the ODD firmware can read. You can choose between two methods to create a table of personally chosen palettes. The straightforward approach is to create a CSV file and edit it with software like LibreOffice Calc.
The second method is to use GBP files. The script will use the filename as the name of the palette. You can obtain GBP files, for example, from emulators. The script is also capable of processing entire directories. You can store multiple GBP files in one directory and let the script combine them. Additionally, you can generate CSV files from a folder containing GBP files. Let’s clarify this with a few examples:
Creating binary data from a CSV file:
odd_custom_palette.py my_user_palettes.csv my_user_palettes.bin
Creating binary data from a folder of GBP and/or CSV files:
odd_custom_palette.py ./my_palettes/ my_user_palettes.bin
Creating a CSV table from a folder of GBP and/or CSV files:
odd_custom_palette.py ./my_palettes/ my_user_palettes.csv
Auto palettes
Auto palettes contain the same data as user palettes but also have an ID field. If the game ID matches the ID field of one of the auto palettes, the ODD firmware will automatically select this palette. The generation process is largely the same, but you must use CSV files only, as GBP files cannot store the ID.
The same script is used to generate the binary data, but with the -id parameter.
Creating binary data from a CSV file
odd_custom_palette.py -id my_auto_palettes.csv my_auto_palettes.bin
Custom logo
Creating a custom logo is simple. You can design it using your favorite image editor. It’s best to start with a 160x144 canvas to get the aspect ratio correct. Save the image as a PNG file. The finished image can then be converted into a format readable by the ODD firmware using the odd_custom_logo_generator.py script.
Converting image to grayscale binary for ODD firmware:
odd_custom_logo_generator.py my_logo.png my_logo.bin
Writing the data to the ODD
After creating the different binaries, you need to upload them to the correct positions in the ODD’s flash memory. The easiest way to achieve this is by using the same mechanism that is used to upload firmware to the device. To do so, we will need UF2 files, which can be processed via the USB bootloader. I have added the uf2conv.py script by Microsoft to the script folder. It can be used as follows:
Conversion of the auto palette data:
uf2conv.py -c -b 0x10190000 -f RP2XXX_DATA -o my_auto_palettes.uf2 my_auto_palettes.bin
Conversion of the user palette data:
uf2conv.py -c -b 0x101B0000 -f RP2XXX_DATA -o my_user_palettes.uf2 my_user_palettes.bin
Conversion of the custom logo data:
uf2conv.py -c -b 0x101B8000 -f RP2XXX_DATA -o my_logo.uf2 my_logo.bin
You can boot the ODD into the UF2 bootloader by pressing the bootloader button during power-on while the device is connected to a PC. Copy the UF2 files to the RP2350 drive. The firmware should automatically detect the new custom data.
Non-volatile data area
The ODD uses a flash memory area to store non-volatile user data. In order to support the upcoming RP2354B chips with integrated 2MB memory the valid total flash memory is limited to 2MB. The first 1.5MB is reserved for the program data. This is followed by 512kB of user data. With respect to the flash and program data offset (0x10180000) The non-volatile memory is organized as follows:
address offset | address absolute | description | size |
---|---|---|---|
0x00000000 | 0x10180000 | configuration values | 64KiB |
0x00010000 | 0x10190000 | automatic palettes | 128KiB |
0x00030000 | 0x101B0000 | user palettes | 32KiB |
0x00038000 | 0x101B8000 | custom logo | 8KiB |
Pre-generated palettes from TheWolfBunny64
When it comes to custom palettes for the Game Boy you will sooner or later find the name TheWolfBunny64. It seems like he started something with his passion for the 4-color limeted handheld. Many people who are publishing their own takes on custom palettes mention him on the demo image or in their comments as a source of inspiration. He recently posted on bsky:
“One reason why I made #GameBoy palettes since 2019: to carry on the Game Boy’s legacy. Truth told, it gets repetive to play games in the same old four shades of green. Hence why I made holiday palettes like these, to make things a bit more festive. And you can find them on itch and Analogue Pocket.”
(https://bsky.app/profile/thewolfbunny64.bsky.social/post/3lkvt2ska2s24)
And I really wanted to add “… and on the ODD” to his last sentence. I had a short chat with him asking for permission for the use of his material and also started following him on bsky (@thewolfbunny64.bsky.social). He really seems passionate about what he is doing and it looks like he invests a lot of time into it. Maybe you should consider thanking him for his hard work.
Thanks Patrick!
In the following you will find the different palette packs downloadable as directly flashable UF2 files. Enjoy!
Palette Packs
American Pop Culture Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: American_Pop_Culture_Pack.uf2
Anime and Manga Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Anime_and_Manga_Pack.uf2
Bandai Namco Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Bandai_Namco_Pack.uf2
Company Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Company_Pack.uf2
Food and Drink Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Food_and_Drink_Pack.uf2
Gaming Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Gaming_Pack.uf2
Holiday Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Holiday_Pack.uf2
Japanese Company Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Japanese_Company_Pack.uf2
J-Pop Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: J-Pop_Pack.uf2
K-Pop Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: K-Pop_Pack.uf2
Legacy Palette Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Legacy_Palette_Pack.uf2
Misc. Palette Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Misc._Palette_Pack.uf2
Nintendo Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Nintendo_Pack.uf2
Sports Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Sports_Pack.uf2
Traditional JPN Colors Pack
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: Traditional_JPN_Colors_Pack.uf2
Full palette set as CSV
Author: Patrick Adams (TheWolfBunny64)
Source: https://thewolfbunny64.itch.io/game-boy-custom-palettes
Download: TheWolfBunny64_All.csv
Can be used to create your own selection from the different sets. Just follow the CSV to BIN conversion paragraph.
More sources for palettes
- https://github.com/davewongillies/openfpga-palettes
- If you know more let me know
Link to the Python Scripts
1229 Words
2025-04-26 02:00