libretro: Use Sony CXA2025AS palette from YUV generator

This commit is contained in:
Rupert Carmichael
2025-03-17 22:52:32 -04:00
parent 0316e954eb
commit 855ba403e3
2 changed files with 12 additions and 27 deletions

View File

@@ -103,26 +103,6 @@ static bool is_pal;
static byte custpal[64*3];
static char slash;
static const byte cxa2025as_palette[64][3] =
{
{0x58,0x58,0x58}, {0x00,0x23,0x8C}, {0x00,0x13,0x9B}, {0x2D,0x05,0x85},
{0x5D,0x00,0x52}, {0x7A,0x00,0x17}, {0x7A,0x08,0x00}, {0x5F,0x18,0x00},
{0x35,0x2A,0x00}, {0x09,0x39,0x00}, {0x00,0x3F,0x00}, {0x00,0x3C,0x22},
{0x00,0x32,0x5D}, {0x00,0x00,0x00}, {0x00,0x00,0x00}, {0x00,0x00,0x00},
{0xA1,0xA1,0xA1}, {0x00,0x53,0xEE}, {0x15,0x3C,0xFE}, {0x60,0x28,0xE4},
{0xA9,0x1D,0x98}, {0xD4,0x1E,0x41}, {0xD2,0x2C,0x00}, {0xAA,0x44,0x00},
{0x6C,0x5E,0x00}, {0x2D,0x73,0x00}, {0x00,0x7D,0x06}, {0x00,0x78,0x52},
{0x00,0x69,0xA9}, {0x00,0x00,0x00}, {0x00,0x00,0x00}, {0x00,0x00,0x00},
{0xFF,0xFF,0xFF}, {0x1F,0xA5,0xFE}, {0x5E,0x89,0xFE}, {0xB5,0x72,0xFE},
{0xFE,0x65,0xF6}, {0xFE,0x67,0x90}, {0xFE,0x77,0x3C}, {0xFE,0x93,0x08},
{0xC4,0xB2,0x00}, {0x79,0xCA,0x10}, {0x3A,0xD5,0x4A}, {0x11,0xD1,0xA4},
{0x06,0xBF,0xFE}, {0x42,0x42,0x42}, {0x00,0x00,0x00}, {0x00,0x00,0x00},
{0xFF,0xFF,0xFF}, {0xA0,0xD9,0xFE}, {0xBD,0xCC,0xFE}, {0xE1,0xC2,0xFE},
{0xFE,0xBC,0xFB}, {0xFE,0xBD,0xD0}, {0xFE,0xC5,0xA9}, {0xFE,0xD1,0x8E},
{0xE9,0xDE,0x86}, {0xC7,0xE9,0x92}, {0xA8,0xEE,0xB0}, {0x95,0xEC,0xD9},
{0x91,0xE4,0xFE}, {0xAC,0xAC,0xAC}, {0x00,0x00,0x00}, {0x00,0x00,0x00}
};
static const byte royaltea_palette[64][3] =
{
{0x5A,0x61,0x65}, {0x00,0x23,0xA8}, {0x0F,0x17,0xB0}, {0x28,0x12,0x9F},
@@ -1179,13 +1159,17 @@ static void check_variables(void)
video.GetPalette().SetMode(Api::Video::Palette::MODE_YUV);
video.SetDecoder(Api::Video::DECODER_ALTERNATIVE);
}
else if (strcmp(var.value, "cxa2025as") == 0) {
video.GetPalette().SetMode(Api::Video::Palette::MODE_YUV);
video.SetDecoder(Api::Video::DECODER_CXA2025AS_US);
}
else if (strcmp(var.value, "cxa2025as_jp") == 0) {
video.GetPalette().SetMode(Api::Video::Palette::MODE_YUV);
video.SetDecoder(Api::Video::DECODER_CXA2025AS_JP);
}
else if (strcmp(var.value, "rgb") == 0) {
video.GetPalette().SetMode(Api::Video::Palette::MODE_RGB);
}
else if (strcmp(var.value, "cxa2025as") == 0) {
video.GetPalette().SetMode(Api::Video::Palette::MODE_CUSTOM);
video.GetPalette().SetCustom(cxa2025as_palette, Api::Video::Palette::STD_PALETTE);
}
else if (strcmp(var.value, "royaltea") == 0) {
video.GetPalette().SetMode(Api::Video::Palette::MODE_CUSTOM);
video.GetPalette().SetCustom(royaltea_palette, Api::Video::Palette::STD_PALETTE);
@@ -1644,7 +1628,7 @@ bool retro_load_game(const struct retro_game_info *info)
}
else
{
memcpy(custpal, cxa2025as_palette, sizeof(custpal));
memcpy(custpal, royaltea_palette, sizeof(custpal));
if (log_cb)
log_cb(RETRO_LOG_INFO, "custom.pal not found in system directory.\n");
}

View File

@@ -142,7 +142,8 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"video",
{
{ "cxa2025as", "CXA2025AS" },
{ "cxa2025as", "CXA2025AS (US)" },
{ "cxa2025as_jp", "CXA2025AS (JP)" },
{ "royaltea", "Royaltea" },
{ "consumer", "Consumer" },
{ "canonical", "Canonical" },
@@ -157,7 +158,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
{ "custom", "Custom" },
{ NULL, NULL },
},
"cxa2025as" /* TODO/FIXME - is this correct ? */
"cxa2025as"
},
{
"nestopia_overscan_v_top",