Real GBA and DS-Phat colors


#154

Thanks for getting back to me so quickly.

I’ve tried tweaking the individual color channels (which is what it sounds like you initially did in mgba), this let me match your output but only for certain color tones.

I didn’t realize the pictures were from December, I’ll wait for your next shader update before I go crazy trying to make mine match :stuck_out_tongue:


#155

Just my luck that I would fix it right after I posted the question.

Even though our unfiltered RGB values are different, your coefficients still work great! Turns out at some point in the color correction pipeline, I accidentally assigned the blue 8-bit bus some of the green pixel data…I guess I need more sleep.

So far I’ve put in GBA-colors, VBA, NDS, PSP. I’ll probably make the 9 color coefficients user programmable, with a couple of profiles to save the coefficients.


#156

In Color-Mangler shader, how it works is the Red, Green, and Blue primaries have rgb values in each of them. It has to be low values for other colors in RGB primaries (R:77,G: 08,B:15) to fit to 100% pure white reach without overexposing. It looks a lot dark without gamma correction (196,20,38). The color-mangler shader does have to brighten the RGB primaries and luminance (226,83,108). Display_Gamma is the one that does gamma correction in a final output. This is from my last version for the red color.


#157

I updated my shaders for GBA and NDS to better match the sRGB and it is more accurate for many monitors and devices that calibrates to sRGB. I updated the LUT textures too. For GBA, I did curve tweaking from photoshop to darken the image with more compression, and the NDS texture is on absolute chromatic because the Red, Green, and Blue has different luminance and has a slightly cold look on both screens, and I did adjust the secondary primitives in photoshop to match the hardware. The shader is based on relative chromatic, so whites are pure white. NDS was a bit tricky to adjust and took me weeks to get it right. While GBA and NDS are less saturated, GBA has more saturated olive green than NDS, while the red in NDS is more saturated and doesn’t really changed its hue.

Links is updated at the first page. Photos will change soon.


#158

Thanks for the great effort. I was testing the latest version of the shader but lcd-grid-v2.cg doesn’t work (timestamp of 24-10) while the former version (from 13-07) did. I tried testing with the nvidia.cg version as well without success. I admit I’m on an old retroarch version but I have many things configured to dead to now start reconfiguring everything again (I’ve been testing).

Also, do you know how I could amp the saturation a bit, I guess in gba_color.cg? I know this is not faithful to the hardware but I’m trying to settle somewhere in the middle where I can find some visual appeal.

Edit: btw I got some “nice” saturation from loading lcd-grid-v2-gba-color-motionblur.cgp and limiting the layers to 2 in rgui, rather than straight up loading a 2 layers of the same shader like lcd-grid-v2-motionblur.cgp, this intrigues me. https://postimg.org/gallery/2w06kc3os/


#159

Back to the color space conversions again. I learned more about the hardware and games that were optimized for GBA.

I released a new version just now. It has got more better and pretty accurate. GBA shader is not as cold as it used to be, so it looks more natrual now. Nintendo DS shows more saturation difference from GBA, and the red is warmer than from GBA. I had to use multiple lights for the GBA.

https://drive.google.com/open?id=0B5KxdoFEcyTkZ3I0WWZkM00zT0k

I did a special trick to sample the color primaries from the screen to my monitor. I had to match the white brightness, and also add nearest 50% gray as a sample to reverse the color temperature from the systems. The gray one is how I made the color temperature more appealing to the shaders and better matches the hardware when you play a same specific colorful games for quite a while and your eyes adjusts slightly to the color temperature of the hardware, and seeing the midtone areas now matches the hardware now. The gray sample were a bit cold on the Nintendo DS, but a bit more on the GBA, and I used few lights to capture all the color samples to find the actual white balance when putting the colors to the shaders, and then I find the white color value. I used Photoshop curves to force the white exactly the white for my IPS monitor and even got the gray to have the color balance, and combining all the color samples from the light sources improves the visuals. I even play the same games on those systems to see how it looks. It seems more identical and the Nintendo DS one is pretty identical. The GBA one looks identical too, and I finally have it look more different from NDS. Also, when I sample the colors in RA with color mangler, I loaded an LUT as a last shader for the monitor to be calibrated to sRGB, and let Photoshop use the monitor’s colorspace to directly work with the color samples.

I also updated the LUT shaders and the PSP and Palm ones to brighten the color primaries a bit.

I noticed during the hiatus, I see the GBC one on the pack, and the one from Gambatte. The latter seems to not have gamma corrected, and the former’s grayscale and white one is not balanced. I haven’t gone into the GBC ones as much, but I looked a bit on the BGB one. In the BGB, the saturation and gamma seems to be put after color correction, so playing around with those are affecting the color primaries too. Without those, it looks similar to Gambatte’s color correction. I’ve look on Sameboy, but I haven’t gone much experience on that.

I did found an old tool from 2000 that tries to mainpulate the GBC color appearance. http://www.devrs.com/gb/software.php#pict2gb Gameboy hicolour convertor. It does reduce the contrast like how VBA-M and NO$GBA does it, but putting the contrast in full range, the color primaries are really the basis for the emulators for GBA. The tool does use higher gamma/curves to brighten the image. This is where the color sampling came from. Although, I am not sure which color correction is closer to GBC. I would eventually get one, but I have few GB and GBC libraries to see the color primaries.

Edit: I don’t have an option to edit my post, but here is the photos of my current shaders:

GBA games with NDS, GBA, and VBA shaders:

Another GBA games with NDS and GBA comparisons with Darken settings:

NDS games with NDS-Color shader:

PSP games with PSP-Color shader:

A comparison to a game with a help of color corrections for the original art:

Ultimate comparison and explanation on Pokemon Yellow title screen:

Link

Last one does show how most of the color correction show how it treats yellows.

I recommend using the GBC, GBA, or NDS shaders on those games over other color corrections that are implemented on the emulators. Here is the color mangler settings that Extrems used on his Gameboy Interface for color correction: https://www.gc-forever.com/forums/viewtopic.php?f=37&t=2782&start=625#p38593

I did a lot of experiment on the color correction side on the GBC. I did use GBC-Color and did a white balance on it. I would add more shaders on the package very soon.


#160

Link above is updated, including two GBC shaders in the package. The gbc-color is my tweak to Monroe’s shader, and I just did a white balance and have the grays have balanced colors. I put myself in the credits for slight tweaks. The gbc-dev is a close replication of Jeff Frowhein’s color correction, minus the contrast adjustment and have the red slightly higher for pure white balance. LUT of the previous shader is included, and the gamma ramp is identical to Frowhein’s program than the shader.

The latest version is v10. GBA and NDS have closer accuracy and pretty identical to the hardware. PSP, Palm, and VBA have slight adjustment. Added GBC-Dev and made a white balanced on gbc-color.


#161

I made a conversion list for developers who are implementing color correction to their software. This is specifically about how the GBA-Color shaders or Color-Mangler shader performs. Most of the color shaders are based on Color-Mangler shader.

The top one shows how it’s converted correctly. The conversion is explained.

Color-Mangler has multiple conversions.

First, it changes the gamma to 2.2 on the image, so it is darker. It is from Target_Gamma command that darkens it.

Then, we have the color values, RGB ones, luminance, saturation, and contrast applied before reversing the gamma on the next step. It is set on a dark image from the first step.

Finally, we have Display_Gamma command that does the gamma conversion on the processed image. It does reverse the gamma, so it does divide 1 with whatever the number it is set on Display_Gamma, like 2.2. (1/2.2) = 0.4545…

This is a similar process that the .icc profiles do on applications to have correct brightness on the colors with color correction on the image. As you can see on the final image, the color primaries have better luma levels. As you can see on the final and right image, that’s how the GBA looks when I used the actual hardware.

So here are the wrong process ones:

  1. On the middle of the photo, it only does color correction with the same RGB values from the shaders above, but without gamma conversion involved. It is the same effect if you set both Target_Gamma and Display_Gamma to 1.0 to not have any gamma conversion.

It causes darker colors overall, and it is more noticable on the primary colors such as pure red, green, and blue. I’ve seen this conversion on apps like Gambatte and Sameboy where the converted colors are darker on colors. The latter has darker greens and yellows, making them more noticably dark. The Zelda image may not look as dark, but that’s because the colors on those snapshots are not originally showing pure RGB colors.

  1. For color conversion, if you want to bring the primary colors to have the exact colors from the correct solution without using gamma conversion, you would have to put different values on each color values to have it exactly on the primary colors only.

However, because of that, along with the lack of gamma conversion, it causes unstable image. It looks too bright that clips through. Also, the greyscale are not grey at all, so colors are all over the place. This is even worse solution overall.

I know by doing color conversion with gamma involved, the color primaries change because it is supposed to look darker on the process in order to look great on the image overall. The gamma conversion is needed to retain both luminance and saturation from the original display to emulate well. .icc profiles does this approach since most displays only have gamma at 2.2, so it is needed.

More info about Color Conversion:

http://www.libpng.org/pub/png/book/chapter10.html


#162

@Pokefan531 Amazing work. The gbc_color shader is incredible. With the right combination of shader passes, like a good LCD grid and a console border, I think it allows for the definitive way to play all GBC games with the best of all worlds, to the point that I probably will never want to go back to any of the real consoles again (I can live without the nostalgic golden sheen of the GBC screen).

For the GBA, however, I am wondering if there could be a better approach, or a more balanced “set and forget” sort of color correction.

What I mean is that the gba_color shader works wonderfully for those obvious cases where the game designers overshot the colors expecting hardware compensation, such as the well known cases of Golden Sun, Wario Land 4, and Castlevania HoD (when I played this game on a backlit GBA I thought Konami was trying to go for really psychedelic colors!). The most general trend seems to be that when designers were aiming for earthy/brown colors (or light blues) the raw colors display a garish yellow (or purple).

But in testing a bunch of games for the past few days I’m noticing that a lot of what “should” be the right colors actually show with the raw colors of a backlit GBA/DS, and the gba_color shader distorts them. I base this “should” on colors used in official artwork, other games in the pertinent series, or colors used on the console from which the game was ported (usually the SNES). The general trend I see here is that, post correction, reds that “should” be a vibrant red become more of a ruby color, what “should” be blue shifts toward cyan, green shifts to teal. Also, in particular, it looks like skin tones are negatively affected, making them too red. Oh, the Capcom logo is another example.

Consider, for example, the Phoenix Wright games, the Metroid games, A Link to the Past, and even Super Mario Bros. Advance 2. Phoenix Wright’s canonical skin tone and blue suit color are distorted post correction, but look correct on backlit consoles. Samus’ yellow suit in Zero Mission as well as her fusion suit appear more accurately when played on a backlit GBA/NDS. The colors in ALttP look almost identical to the SNES colors with the aforementioned consoles (when the lowest brightness setting is used in-game), but very different with the correction shader. Super Mario Bros. Advance 2’s problem actually seems to be simply one of gamma (funnily, this game looks SNES-correct on a DS Lite when the screen is turned downwards about 10 degrees thanks to the inferior viewing angles of this TN screen!).

Even an early DS game like Super Mario 64 DS exemplifies this idea. The colors do look on the garish side when raw/on a backlit console, but they are in fact closer to the original N64 colors than with the nds_color correction shader.

Overall, I am left with the sense that the GBA (and possibly NDS) color shaders are more suitable for a minority of cases rather than for most. Perhaps I’m too greedy in hoping for a one-size-fits-all color shader for the GBA, and surely don’t know enough about color conversion to realize how unfeasible it would be, but I’m still wishing that a more general solution is available to help people move away from the real handheld consoles and their disadvantages without having to second-guess the choice of shader frequently.


#163

My shaders got updated few months ago, but it hasn’t been updated on the repo. I did however do a lot of tweaking with how the colors are supposed to look. It is a bit tricky because to see the correct temperature on the screen with different light temperatures, I had to make the 50% grey color from the screen to set the correct temperature on multiple light source. The lights I have kinda made the whites on the screen to try to reach near 6500k. Although, the blue color is supposed to be a bit bright. The hue seems to be like this on the blue primary color.

As for GBC, I’m getting one to see how the colors actually look. It would take a few weeks to examine it. I want to see if the luminance is actually higher than the GBA. Remember, the gbc-color shader started by Monroe who tried to tweak from the gambatte implentation, with gamma correction and hue colors fixed, and I corrected the color temperature. Just to note that both Gambatte and mGBA (maybe VBA-M), the highest green value is 251.

I’ve played around with the LCD-cgwg-V2 shader. I used my phone that has native 1440p resolution and to take snapshot from my PC. I put several sizes and try to have the closest size to GBA-SP AGS-101 (backlit), and LCD-cgwg is pretty similar to how it looked on my GBA SP. The SP subpixel order is BGR instead of RGB. I did change a few settings on the shader presets in the package long time ago to make the lcd shaders be slightly bright, but I decide to leave the gain and the subpixels the default to see better white shades. I would have the black levels at 0, and gamma to 2.2, since most displays are using gamma 2.2.


#164

Are the most updated shaders the one you linked to here (https://drive.google.com/open?id=0B5KxdoFEcyTkZ3I0WWZkM00zT0k) on your August 9 post?

I replaced the files from the repo with these, and for the gba_color shader I can see a clear improvement! Reds and skin tones in particular look much closer to natural now, and overall colors feel more balanced. I would have had no idea, I just assumed that the repo files were the most up to date! Someone should really push the new files into the repo.

I checked out the updated gbc_color also and I can’t tell as much of a difference, but once again it looks fantastic. In a couple of weeks I should have access to my non-backlit GBC, GBA, and DS consoles and will see with more attention how they compare.

I still feel that for a lot of GBA games in particular the raw colors seen in emulators and backlit consoles are what the game designers really wish could be shown, hoping for the best given what the limited GBA screen was able to display. For those colors, the color correction may be a disadvantage. The problem is when they combined those ideal colors with clearly overdone colors with the limitations of the screen in mind, sometimes overwhelmingly. In any case, for those games where they did the latter to an extraordinary extent, I think nothing will beat playing while using these shaders. I’m really glad someone put in all the work needed to make it available to handheld fans.


#165

Yes.

I think they only updated the gbc-color ones, or it may look similar. To compare the screen and the shaders, it is tricky to see the same exact colorspace. A lot of monitors are aimed on the sRGB colorspace, but most of them are just very close to it. Monitors in a lot of cases aren’t calibrated to 6500k as often, but still looks very close. The screens on the NDS are a bit colder like above 6500k. Also, depending on the light source, the gba and gbc screen needs to be lit that is close to the standard color temperature. The best way I found to compare is to play the game on those screens as often. The eyes would adjust the color temperature on the screen. Also, unlike modern screens, the greyscale is not 100% grey or close to the white temperature of the screen, so it looks a bit colder. I had to use the curve tool on Photoshop to get the best results. This method does the best job at replicating the color temperature that your eyes see when it’s already adjusted. It is best to find a light for non-lit screens that is close to the standard temperature to see better. Just to note that those screens often show the rainbowing effect, especially if you use a flashlight on the screen. Commonly on the first party games, early games was adjusted for the screen, and they pre-calibrated the colors for the screen to see the same visual effect.

One last thing. Not sure if Woozle is available, but my last two posts involved how the colors are adjusted by using the gamma correction, or gamma-to-linear method to adjust colors on the primary so some colors don’t look dark, mainly around the primaries. I’ve seen the post for the Gambatte that added my gbc shader, and showed that it is an alternative to gambatte’s color adjustment. I’ve seen GBA HDMI clips and I want to contact him about the gamma correction method.

More info on gamma correction:


#166

It would be great if you could get in touch with Woozle. He already has implemented color correcting shaders and gamma settings on his GBA consolizer, but shaders on his consolizer and on the Retroarch side stand to gain from some comparison and collaboration. You could try reaching out to him through this twitter account: https://twitter.com/Woozle64


#167

The ‘Anime’ comparison screenshot you posted previously, is that a shader, is it possible to download it? I am using RetroArch on Android if that’s compatible…


#168

No. It’s from the actual anime, Mermaid Melody. It’s posted to compare the results.


#169

About a year ago i was trying to get correct colors in Retroarch for GBC and GBA games using your shaders.

GBA games came out looking great (gba-color.glsl + lcd-grid-v2.glsl is basically perfect, fantastic job), but i never found a good combo for GBC (the current results are all waaaaaaay too red). You may find the info that resulted helpful if you are working on the GBC shader:


#170

And for a more current update/condensation:

Youtube capture from a video of someone playing on a real 1998 GBC: https://i.imgur.com/OuDjope.png

VisualBoyAdvance-M with Gameboy Colors: https://i.imgur.com/bUWoPBA.png

Gambatte w/ gbc-color.glsl (Color Correction core option off): https://i.imgur.com/Wws1Ft4.png

Gambatte w/ gbc-color.glsl (Color Correction core option on): https://i.imgur.com/vaonMTJ.png

Gambatte w/ gbc-dev.glsl (Color Correction core option off): https://i.imgur.com/geL3UaW.png

Gambatte w/ gbc-dev.glsl (Color Correction core option on): https://i.imgur.com/T8JpPw8.png


#171

Not sure what type of LCD the reflective screens looks, but lcd-grid-v2 seems to look fine with default settings. I already did my project on a real GBC that I got nearly two months ago and did some research on it. I haven’t finished yet because I need much further tests on it. I also have very few librarys of gameboy games to show full main color primaries. I only got Red and Blue ones, but pur Green isn’t in the color picker from the bootstrap. All I can say now is that the screen is similar to GBA, but the gamma is different. I would explain it as a blog post to show what I mean.

On VBA, the color correction makes the screen have less contrast. On my early days in this forum, most users prefer seeing with full 0-255 range instead of what those internal color correction has looked. The blacks were more grey, and the whites are darker. On GB/GBC, VBA would make the gamma brighter and GBA darker. Also, the red is slightly down, but despite all this, they pretty much looked identical to what vba-color shader looks.

Both Sameboy and Gambatte’s fast color correction seems to not use gamma correction on the main primaries, which makes those pure colors appear darker than midtone colors. Sameboy pretty much keeps the saturation levels from pure RGB format, only blue is more torqouise. Also, it’s not a good idea to use those shaders with the emulator’s color correction enabled because it makes things more desaturated than it should. With GBC, depending on the light angle, usually above the screen, the gamma is lighter, so the grey ramps are brighter. It can play with how the midtone colors look.

As for my new GBC shader, made from scratch, it is not done yet. I made my own data for the gamma, and checking how the color primaries should look.


#172

Ah. Well i look forward to seeing your new GBC shader in action when you finish it then (:


#173

Great to hear a new GBC shader is in the works.

With what is currently available, what is the best combo of grid shader, color shader, and emulator for the closest picture to the real GBC?