Real GBA and DS-Phat colors


#1

Shaders created to create the GBA (Original, SP AGS-001, and Micro), NDS (PHAT), and PSP (1000 or 2000 slim) to output the same color matrix display as the real hardware. Normal version simply has the .cg, .glsl, or .slang file. LCD.cgp adds the lcd-cgwg.cg and Motion Blur (PSP only) to the output. .glslp and .slangp counterparts are there too.

This version no longer uses LUT texture and is more GPU friendly on lower ends. gba-color replicates how most gba hardware colors looks like and includes the light intensity settings. nds-color replicates the look of the original Nintendo DS displays. psp-color replicates the look of the PSP 1000 or 2000 models. vba-color looked like my last year’s version. It’s not as accurate but few prefer this and it is like VBA-M and No$GBA but better contrast.

Story: As you see the early GBA games, especially around launch, they were brighten and more saturated to match the screen since it has no backlight and the color space is different from our standard sRGB format. The colors are a bit washed out with darker gamma and a lot of GBA games are usually based on GBA format. One example of over brighten and saturation is Golden Sun, Mario Kart Super Circuit, and DK king of swings. They were designed for GBA to match the display. GBA SP AGS 001 uses the same exact screen as the original GBA model except it has front light instead, and the color space is preserved. The near failure Game Boy Micro had poor sales, but it has a backlight and better screen of all GBA models that preserves it’s own color space while having better visuals. The GBA SP AGS 101 came out around late 2005 and adds backlight, which gives better lighting, but it uses near standard sRGB and gamma which wasn’t design for early games. The gba mods like the afterburner uses the GBA color space. Late GBA games around 2006 may started using near sRGB format when GBA SP 101 and DS Lite were mainly selling. Though, a lot of GBA games are usually based on the original color space and brightness. Games like Castlevania probably wasn’t optimized for the system’s brightness, which is why I created the another version of the shader, also known as gba-shader-high to see how it looks in a bright light and see games with less optimized brightness.

DS and PSP has a similar story aside from the brightness. They had their own color spaces, and NDS Phat, the first model, has a similar color space from GBA except a bit more saturated and bright. Some DS games prior to the DS Lite and mid 2006 may be optimized for NDS color space. It stopped when DS Lite and models after it uses the near standard sRGB gamut. Though, playing older games on those models aren’t as a big deal as much as GBA. The PSP has a similar story to an extent. Prior to PSP 3000 or Brite, it has it’s own color space too and some games were optimized for it, but some games or especially multiplatform games prior to 2008 like Lego Star Wars II were based on sRGB instead.

Here is the data documented for DS Lite and PSP 1000: http://www.displaymate.com/psp_ds_shootout.htm

Settings: GBA-Color - Darken Screen: 0.0-1.0 [Default: 0.5] NDS-Color - Gamma Mode: 2.0-2.4 [Default: 2.0] PSP-Color - Gamma Mode: 2.2-2.4 [Default: 2.2] VBA-Color - Darken Strength: 1.0-2.9 [Default: 2.9]

Media:

https://www.youtube.com/watch?v=yA-aQMUXKPM Video

GBC:

Variants of filters and settings:

GBA:

GBA and NDS:

NDS:

PSP:

Color Comparison:

Mermaid Melody:

Lucky Star:

New release is at the attachment.

(Version 9.2) Greatly Improve the accuracy on the GBA and NDS with better sRGB monitor with use of icc profile and reshade LUTs. LUT reshade of those shaders are updated. It includes .cg, .glsl, and .slang for your devices.

Note: These shaders are based on sRGB color space and the shaders are most accurate in LCD displays with most optimal display in sRGB standards. I recommend having color calibrated screen unless if it’s very close to sRGB color space. Any device that is very near or exactly in sRGB color gamut will get good results. For later Samsung devices like S6 or S8, change display mode to basic as it displays in sRGB modes. Screens with Adobe or especially OLED Wide Gamut may over-saturate the screen, including the shaders. Color temperature near or exact to 6500k and gamma 2.2 is recommended for best view.

https://drive.google.com/file/d/0B5KxdoFEcyTkZ3I0WWZkM00zT0k/view?usp=sharing Version 9.0


Handheld Border Shaders
Good scanline shader for gameboy advance?
#2

Excellent, thanks. Any chance of putting up file links ? I’m stuck on my mobile phone for the Internet, for a short while, and cutting and pasting text in KitKat is quite hard, especially with browsers that don’t let you use the clipboard properly.

What I have been using to sort of desaturate the colours of most systems is to use a overlay with my own custom reflective screen overlay. GBA, for example, I took some high-res shots of my gba’s screen, so you end up with a slightly dark grey screen with a reflection. Works great. Look forward to trying your shader.


#3

I plan to upload the .cgp with different variation, like with xbr, motion blur, and LCD shaders combined. I would upload them later when I figure everything out with the setting.

Edit: Here is the .cgp files with several variations.


#4

Thanks.


#5

So I made a comparison of my shaders with the GBA Colors. I only used my gba .cgp shaders to compare it with the real colors.

http://imgur.com/6IKkrVD

My shader looks more identical, but the only thing it lack is color shifting and hue changes that VBA-M had. The blue hue is supposed to be nearly cyan and the green is a slight olive green color. Because how the colors were shifted for hue changes, it makes the yellow a very slight orange and magenta colors bright. Only the red is left in the original hue. It is a similar situation to the Nintendo DS Phat, but the blue is slightly darker than “Gameboy Colours” from VBA-M. The other difference is that mine has more contrast, meaning the blacks are less washed out.


#6

That looks very close to VBA-M’s. Good work :slight_smile:


#7

Looks good could you make pull request with it in common shaders repository at Github ?


#8

Nice. I tried to get the same result but with real black (means even less washed out).

shaders = "3"
shader0 = "../srgb-helpers/first-pass-linearize-simulate-gba-on-lcd.cg"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
shader1 = "../misc/image-adjustment.cg"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
shader2 = "../handheld/lcd_cgwg/lcd-grid.cg"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
parameters = "target_gamma;monitor_gamma;overscan_percent_x;overscan_percent_y;saturation;contrast;luminance;bright_boost;R;G;B"
target_gamma = "1.900000"
monitor_gamma = "3.500000"
overscan_percent_x = "0.000000"
overscan_percent_y = "0.000000"
saturation = "0.600000"
contrast = "1.000000"
luminance = "1.000000"
bright_boost = "0.000000"
R = "1.000000"
G = "1.000000"
B = "1.000000"

It’s still quite dim, hard to avoid that with those shaders. Brightness boost always messes with the black and causes some moiré with scanlines and stuff.


#9

Thanks for appreciating my shaders everyone. Through, I want to do some tests with these shaders before releasing it as v2. For NDS phat shaders, it does minimal desaturation as the real system does, and has better brightness than GBA. For sRGB GBA shaders, the first pass looks much close to the system before adjusting the gamma and desaturate it. You may notice that the blue chroma is darker than it looks like in VBA-M since I cannot find a shader that handles the hue changes to each Red, Green, and Blue chroma. Maybe I could request that, but for now, it should look close just like the picture I posted few days ago. You could try to adjust the brightness yourself for better 0-255 range. In VBA-M and No$gba, it was 32-227, but for mines I lower it down to 16 I believe. I already tried to match the brightness for my nds shader to match my nds phat system, and it should look identical.


#10

I uploaded my third version, and I worked hard to match the colors from real consoles and have more contrast.

http://imgur.com/vCkNp3Z

Also, I couldn’t transfer my Super Mario Advance file from VBA-M to Retroarch, which shows a different sky color when completed the game.


#11

Nice, great work! :slight_smile:

The nds/gba-color-full+motion+lcd.cgp aren’t working on my rig though (nvidia here).

But I just made a custom cgp with gba-color.cgp + lcd-grid.cg. And I added image-adjustment.cg to boost the gamma a little along with the saturation as it gets a bit too dark with the lcd shader.

Great result now, can’t compare to a GBA though, don’t have one.


#12

I also have an nvidia gets 450 and the shader worked in both d3d and opengl. I need to test more with the LCD shader to see what best displays the screen, and I had issues with lcd-cgwg on my laptop with opengl that has glitchy pixels. D3d is worse with lut texture provided with the package, so I have to use lcd3x for my laptop to work with the color correction. Never had this problem with my desktop PC. Also on graphic cards like my laptop with less than 1gb of ram, the color twitches whenever the original color hits 255 on either red, green, or blue channel. VBA-M has lowered it so there’s no problem with that core, but to fix the texture error, the luminance has to be lowed to 254 to prevent that. I would bring that solution up soon.

Reason why the full version was dark is to compassionate the levels to full 0-255 just like how most screens are. The standard is more lighter and tries to match the brightness from the console. That’s the difference of both versions. I don’t have gba-sp AGS 001, only 101 with backlit screen, which is different, my GBA got lost, and I only have Nintendo DS original and VBA-M to match.

I will try to get the best settings for the LCD variants soon.


#13

Can someone reupload version 3 of the shader? The anonfiles link isn’t working.

This probably should be added to common-shaders as well.


#14

Could you re-upload the latest version of your shader? Preferably to another source? The link in the first post is dead and we can only get the outdated version from the .zip attached to your other post in August.


#15

I uploaded here. edit: Newer version here Extract the folder in “handeld” directory (to have handeld/color-lcd/). Hope I didn’t modify anything. I just played around with external cgp if I remember correctly.


#16

Thanks for the mirror!

I think these are awesome, but I’m hesitant to add them to the shader repo because of the enormous LUTs, which would take the repo from like 10 MB to over 100 MB. This could probably come down with proper PNG compression, but it would still be a significant increase.


#17

I also did the compression, and it goes around 11 MB. There is two LUTs in the folder. LUTs is the only algorithm where I could mimic the GBA and nds color output. The original code from VBA-M is here. https://github.com/libretro/vbam-libret … filter.cpp It has a custom palette for rgb values on each color and did a certain gamma. There isn’t a shader like this and I could only do it by Photoshop to modify the LUTs from Aybe’s cymk shader with original color correction PNG. I never use jpeg because it creates weird banding to the colors and gradients.


#18

Uploaded another version of my shader pack that includes the PSP shader and fix some parts of the LUT texture to have a better display.


#19

Thanks for the update.

It’s quite subtle. I can see the green is a bit lighter for the DS… For GBA I’m not sure there is something?

:stuck_out_tongue:


#20

[QUOTE=Tatsuya79;19594]Thanks for the update.

It’s quite subtle. I can see the green is a bit lighter for the DS… For GBA I’m not sure there is something?

:p[/QUOTE]

I did try to match it to the real nds-phat hardware, and it looks more accurate. The GBA has minor washout black from last version and I fixed that part by matching it in photoshop with VBA-M gba color mode.

What do you think about the psp shader?