Skip to content

Commit 4e4c2aa

Browse files
committed
Updated all libretro based color profiles.
Added GB micro, GBA SP (AGS-101), DS lite and VBA/No$GBA profiles.
1 parent dd90d49 commit 4e4c2aa

File tree

4 files changed

+76
-35
lines changed

4 files changed

+76
-35
lines changed

Diff for: README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,17 @@ Video-related settings.
7878

7979
`string colorProfile` - Color correction profile.
8080
* Default: `none`
81-
* Options: `none`, `gba`, `nds`, `nds_white`, `nso`, `identity`
82-
* If you just want less saturated colors or change other basic settings like contrast or brightness then set this to `identity`.
81+
* Options:
82+
* `none` Disable all color correction options.
83+
* `gba` Game Boy Advance.
84+
* `gb_micro` Game Boy micro.
85+
* `gba_sp101` Game Boy Advance SP (AGS-101).
86+
* `nds` Nintendo DS (DS phat).
87+
* `ds_lite` Nintendo DS lite.
88+
* `nso` Nintendo Switch Online.
89+
* `vba` Visual Boy Advance/No$GBA full.
90+
* `identity` No color space conversion.
91+
* If you just want less saturated colors or to change other basic settings like contrast or brightness then set this to `identity`.
8392
* Due to most 2/3DS LCDs not being calibrated correctly from factory the look may not match exactly what you see on real hardware.
8493
* Due to a lot of extra RAM access and extra CPU processing per frame, battery runtime is affected with color profiles other than `none`.
8594

@@ -156,7 +165,7 @@ Game-specific settings. Only intended to be used in the per-game settings (romNa
156165

157166
`string saveType` - Override to use a specific save type.
158167
* Default: `auto`
159-
* Options starting with `rom_256m` are intended for 32 MiB games. Options ending with `rtc` enable the hardware real-time clock. Options:
168+
* Options starting with `rom_256m` are intended for 32 MiB games. Options ending with `rtc` enable the hardware real-time clock:
160169
* `eeprom_8k`
161170
* `rom_256m_eeprom_8k`
162171
* `eeprom_64k`

Diff for: include/arm11/config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef struct
4343

4444
// [video]
4545
u8 scaler; // 0 = 1:1/none, 1 = bilinear (GPU) x1.5, 2 = matrix (hardware) x1.5.
46-
u8 colorProfile; // 0 = none, 1 = GBA, 2 = DS phat, 3 = DS phat white, 4 = Nintendo Switch Online, 5 = identity.
46+
u8 colorProfile; // 0 = none, 1 = GBA, 2 = GB micro, 3 = GBA SP (AGS-101), 4 = DS phat, 5 = DS lite, 6 = Nintendo Switch Online, 7 = Visual Boy Advance/No$GBA, 8 = identity.
4747
float contrast; // Range 0.0-1.0.
4848
float brightness; // Range 0.0-1.0.
4949
float saturation; // Range 0.0-1.0.

Diff for: source/arm11/config.c

+11-5
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,22 @@ static int cfgIniCallback(void *user, const char *section, const char *name, con
166166
config->colorProfile = 0;
167167
else if(strcmp(value, "gba") == 0)
168168
config->colorProfile = 1;
169-
else if(strcmp(value, "nds") == 0)
169+
else if(strcmp(value, "gb_micro") == 0)
170170
config->colorProfile = 2;
171-
else if(strcmp(value, "nds_white") == 0)
171+
else if(strcmp(value, "gba_sp101") == 0)
172172
config->colorProfile = 3;
173-
else if(strcmp(value, "nso") == 0)
173+
else if(strcmp(value, "nds") == 0)
174174
config->colorProfile = 4;
175-
else if(strcmp(value, "identity") == 0)
175+
else if(strcmp(value, "ds_lite") == 0)
176176
config->colorProfile = 5;
177+
else if(strcmp(value, "nso") == 0)
178+
config->colorProfile = 6;
179+
else if(strcmp(value, "vba") == 0)
180+
config->colorProfile = 7;
181+
else if(strcmp(value, "identity") == 0)
182+
config->colorProfile = 8;
177183
//else if(strcmp(value, "custom") == 0) // TODO: Implement user provided profile.
178-
// config->colorProfile = 6;
184+
// config->colorProfile = 9;
179185
}
180186
else if(strcmp(name, "contrast") == 0)
181187
config->contrast = str2float(value);

Diff for: source/arm11/oaf_video.c

+52-26
Original file line numberDiff line numberDiff line change
@@ -126,40 +126,66 @@ typedef struct
126126
float displayGamma;
127127
} ColorProfile;
128128

129-
static const ColorProfile g_colorProfiles[5] =
129+
// libretro shader values. Credits: hunterk and Pokefan531.
130+
// Last updated 2014-12-03.
131+
static const ColorProfile g_colorProfiles[8] =
130132
{
131-
{ // libretro GBA color (sRGB). Credits: hunterk and Pokefan531.
132-
2.f + 0.5f,
133-
0.93f,
134-
0.8f, 0.275f, -0.075f,
135-
0.135f, 0.64f, 0.225f,
136-
0.195f, 0.155f, 0.65f,
137-
1.f / 2.f
133+
{ // libretro GBA color (sRGB).
134+
2.2f + (0.3f * 1.6f), // Darken screen. Default 0. Modified to 0.3.
135+
0.91f,
136+
0.905f, 0.195f, -0.1f,
137+
0.1f, 0.65f, 0.25f,
138+
0.1575f, 0.1425f, 0.7f,
139+
1.f / 2.2f
138140
},
139-
{ // libretro DS phat (sRGB). Credits: hunterk and Pokefan531.
140-
2.f,
141-
1.f,
142-
0.705f, 0.235f, -0.075f,
143-
0.09f, 0.585f, 0.24f,
144-
0.1075f, 0.1725f, 0.72f,
145-
1.f / 2.f
141+
{ // libretro GB micro color (sRGB).
142+
2.2f,
143+
0.9f,
144+
0.8025f, 0.31f, -0.1125f,
145+
0.1f, 0.6875f, 0.2125f,
146+
0.1225f, 0.1125f, 0.765f,
147+
1.f / 2.2f
148+
},
149+
{ // libretro GBA SP (AGS-101) color (sRGB).
150+
2.2f,
151+
0.935f,
152+
0.96f, 0.11f, -0.07f,
153+
0.0325f, 0.89f, 0.0775f,
154+
0.001f, -0.03f, 1.029f,
155+
1.f / 2.2f
146156
},
147-
{ // libretro DS phat white (sRGB). Credits: hunterk and Pokefan531.
148-
2.f,
149-
0.915f,
150-
0.815f, 0.275f, -0.09f,
151-
0.1f, 0.64f, 0.26f,
152-
0.1075f, 0.1725f, 0.72f,
153-
1.f / 2.f
157+
{ // libretro NDS color (sRGB).
158+
2.2f,
159+
0.905f,
160+
0.835f, 0.27f, -0.105f,
161+
0.1f, 0.6375f, 0.2625f,
162+
0.105f, 0.175f, 0.72f,
163+
1.f / 2.2f
164+
},
165+
{ // libretro NDS lite color (sRGB).
166+
2.2f,
167+
0.935f,
168+
0.93f, 0.14f, -0.07f,
169+
0.025f, 0.9f, 0.075f,
170+
0.008f, -0.03f, 1.022f,
171+
1.f / 2.2f
154172
},
155-
{ // libretro Nintendo Switch Online (sRGB). Credits: hunterk and Pokefan531.
156-
2.2f + 0.8f,
173+
{ // libretro Nintendo Switch Online color (sRGB).
174+
2.2f + 0.8f, // Darken screen. Default 0.8.
157175
1.f,
158176
0.865f, 0.1225f, 0.0125f,
159-
0.0575f, 0.925f, 0.0125f,
160-
0.0575f, 0.1225f, 0.82f,
177+
0.0575f, 0.925f, 0.0125f,
178+
0.0575f, 0.1225f, 0.82f,
161179
1.f / 2.2f
162180
},
181+
{ // libretro Visual Boy Advance/No$GBA full color.
182+
1.45f + 1.f, // Darken screen. Default 1.
183+
1.f,
184+
0.73f, 0.27f, 0.f,
185+
0.0825f, 0.6775f, 0.24f,
186+
0.0825f, 0.24f, 0.6775f,
187+
1.f / 1.45f
188+
},
163189
{ // Identity.
164190
1.f,
165191
1.f,

0 commit comments

Comments
 (0)