So, I must ask, what is the difference between these shaders and the options present in the mgba core and standalone?
mGBA standalone uses the same shaders. Only recently did endrift update this one. I guess now it needs another update.
Ok, so i updated to the new values from the latest shaders. I donât know. The GBA color profile now looks a bit more washed out than previously. Thatâs why i added a tiny bit of darkening on top.
You can find a build of this exact version under the Actions tab on GitHub. Obviously you need a modded 3DS that can run FIRM files at boot.
Here is a build where i left darken screen as 0. Itâs just a little too washed out for my taste. https://www.dropbox.com/scl/fi/2synezltfi32pbwlgc1jt/open_agb_firm_gba_color_darken_0_test.7z?rlkey=h03nv1v1bp6m2kqxysxhai0ou&st=bcz867am&dl=1
Yeah I change the default gamma to 0 since the preset shader uses the LUT with gamma I added. The preset defaults to something like gamma 3.0, from the center of the GBA
Yeah, i made a comparison old defaults vs new. The extra brightness is just a little too much for the 3DS LCD since the whitepoint is quite cold. On a normal sRGB LCD itâs quite acceptable.
I also updated my tool for converting screenshots. All you need is lodepng from here and a compiler. Instructions how to compile in line 108.
That reminds me Game Boy Interface has some special settings documented that differ from your shader defaults. Gamma, contrast and brightness. Thoughtâs on this? I also donât quite understand how the values for the settings were calculated.
https://gc-forever.com/wiki/index.php?title=Game_Boy_Interface/Standard_Edition#Color_emulation
Interesting. The input gamma is what the gamma setting on the shader and the LUT shader work, as it does alter the gamma before it does the color correction, which is what the given presets on the wiki states. As for brightness and contrast, somehow it tries to emulate the contrast of the displays to give it a look? Not sure if the given contrast ratio was from the test or something to increase black levels and decrease white levels, but it is interesting. I donât plan on approaching the same contrast accuracy due to varying degrees of LCD displays and varying levels of contrast ratio. I know both Sameboy and BGB tries to replicate it.
Also, on my GBA preset, the input gamma pretty much ranges from 2.2 and 3.8. The default being around 3.0 when flashed the gamma ramps on the GBA in center light angle when using 240p test suite. The GBA shader preset have very similar gamma as the old one as you demonstrated, when I just tested the preset on Retroarch.
That reminds me your shaders do the darken screen adjustment on the input side. I found that doing it like that changes the colors noticeably the stronger darken screen is. Would not it make sense to change the gamma on the output side or is there a specific reason itâs done like this?
Oh, and before i forget extrems explained how contrast and brightness are calculated.
profi200: The values were calculated using part of this formula:
https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1886-0-201103-I!!PDF-E.pdf#page=4
Example for https://www.gc-forever.com/wiki/index.php?title=Game_Boy_Interface/Standard_Edition#Game_Boy_Advance
gamma = 4
brightness = (1 / 250) ^ (1 / gamma)
contrast = 1 - brightness
The output gamma affects the primary colors when doing color correction from RGB. It wouldnât look right, but with input gamma, it affects the gamma before the color correction takes place, which retains gamma corrected color correction to the primary, with gamma 2.2 adjusted.
Merry Christmas!
I got myself a colorimeter and made some measurements. I guess the thread title can now be changed because we have data on old 3DS and IPS New 3DS XL as well. I didnât measure the New 3DS XL bottom LCD because it has a way too warm whitepoint. I plan on doing more measurements as well as measuring my DSi and DSi XL LCDs.
Mentioning my setup just in case i made a mistake. HCFR 3.5.1.4. The colorimeter is a Calibrite Display Plus HL and i made all measurements in the dark under my table and with the second LCD backlight turned off (to prevent the other LCD light from influencing the measurements) because the colorimeter does not sit on the LCD directly (light can enter from the sides). I also made sure colorimeter and LCD are warmed up. This was specially challenging because the 3DS LCD backlight kept drifting downwards even after over 30 minutes to make it stabilize. The New 3DS XL on the other hand stabilized very quickly. I adjusted brightness until the colorimeter read about 80 nits on 100% white for all measurements.
Results:
old 3DS top LCD. Gamma is an accident as well as color temperature. HCFR can only show a single point in the top right corner for the color temperature.
old 3DS bottom LCD. About the same as top but a little bit of a different gamma.
New 3DS XL top LCD (IPS). Much lower delta error rates but still bad in many measurements. The blue channel is different than old 3DS. HCFR also partially canât show the color temperature but itâs much closer to D65 than o3DS.
Bonus microscope shots of the top LCDs i made years ago. In order o3DS and N3DS XL IPS.
The code i wrote to to show the test patterns. The overlay from HCFR showed slightly different values than the reference in a few cases. I used the RGB values shown in the overlay.
The 3ds seems to share very similar colorspace the whole DSLite-DSi and GBA-SP 101 have. The only difference is the blue color is much closer to sRGBâs blue color, only a little higher hue and slightly out of gamut of sRGB. The IPS one has the Red color raise more saturation a bit to nearly its fullest of sRGB, only still a bit more orange like the non-IPS one, and somewhat better gamma and color temps, but far from what average IPS displays from the last couple of years has provided. Still an improvement at the least especially the viewing angle. Also canât wait to see the DSi measurements as well as XLs. I would request the LCD subpixel photo if possible. Thanks for sharing them
I have two AGS-001s. These are second hand so I dunno the history, but these two have screens that look different Hereâs a photo with the frontlight off.
The left one looks warmer, the right one colder.
If you shine light from the top of the LCD does one of them look darker than the other? Thatâs what i observed with my SPâs.
@Pokefan531 I was made aware of a small quirk of how GBA mode on DS works. On DS the LCDs use 6 bits per channel and seems like they bodged it by leaving bit 0 as always zero and the upper bits are from GBA hardware. Mentioning this because the DS (lite) shaders may not be accurate to what it looks like on hardware.
Hi @Pokefan531 , Iâm the developer for a (3)DS Capture Card Viewer software. Iâve already implemented some of your shaders based on the OAF implementation. You can see the data here: https://github.com/Lorenzooone/cc3dsfs/blob/3bc9425bad768fe6be013a4d06a9e9895712fd56/source/frontend.cpp#L369 Thanks a ton for all your hard work!
Iâd like to know, from @pica200 âs files, how could I get the values needed for a shader to recreate the colors of the 3DSâ screens? Thanks a ton for any answer!
Semi-related, but I noticed that FFTA has a color-corrected mode for TVs built into the game. Anyone know of other GBA games that had this feature?
I know some games with GameBoy Player support loading different palettes for it. Mother 3, for example, calls this âGamma Correctionâ in the debug menus.
Thatâs interesting. Is this similar to the built-in colour palettes in the GBC for select GB games? Or is it a debug feature never used. Iâve been recently playing Mother 3 and tinkering with various shaders to get the best âDeveloper-intendedâ look when playing on a TV.
P.S. Thanks for your work on Mother 3 v1.3, dunno who to send this to but the DL from the fobby blog is outdated compared to the one from the github repo, so small chance some players are playing on an outdated patch. (eye drop battle description bug)
There is another that I know of which is Shin Megami Tensei II. Interestingly this also includes a colour mode for the SP as well as TV. It seems to desaturate the reds/oranges and darkens the screen, going from Normal to TV but would be interesting to compare it in detail.
Yeah some screens looks different from screen to screen, on either Sharp or Panasonic brand, model to model of GBA or GBC. They can vary on their white balance from each unit, despite using same model, and same screenâs manufacturer. My GBC and GBA I have around are both made by sharp, and yet I see the GBA being closer to 6500k than GBC or the SP-001 I got from last November.
The gamma itself would look darker once the light shoots from the top. And yeah they may vary gamma from unit to unit, but in most average, the 32-pin Panasonic manufactured displays used in GBA SP-001 and late 2001 onwards of OG GBA model, have around up to 4.0 gamma at its highest when lights shot from the above.
I used the 240p test suite for GBA. The GBA uses 15bit color depth that has all grey swatches be consistently the same RGB value. And when each RGB hits the highest value under GBA test suite, it would use the highest value the screen can output, so nothing is affected by lower color depth, on either DS mode or GBA mode, unless if I need to check in greyscale gamma data. Thereâs 32 swatches from going black to white under GBA.
No problem. Iâm glad I can help out to show off how the shader works, and it turns out to play well under the 3DS virtual console.
I find it interesting to see some games have two colorspace options that targets the OG GBA and the SP-001. I already covered the TV one before, so that should be used when using anything outside the GBA, SP-001, NDS, or GB Micro.
In fact, I had done two weeks so far to update my shader package again, as I just got back to doing colorspace works and include the GBA SP-001 onto the package. Yeah, those Panasonic displays has a different colorspace than ones found by Sharp displays that my GBA and GBC shaders currently uses. While it looks similar, the SP has a bit of less saturation of green but higher luminance, and the red color is slightly warm, but not by much, as it still looks a little cold. Tho it seems like those reflective displays were somehow made to have the red colors to look colder as itâs often shot by warmer light such as the sunlight or fluorescent lights at home that would look warm that is likely below 6500k, with some screen variance on white points to be somewhat warmer, like with Mckimiaklopaâs SP-001 units. My SP-001 is also on the warm side too. But yeah, it is a mess that those displays could not be literally easier to figure out as efficient as backlit displays, so I had to rely on all the tools I use that helped me out over the years. My latest GBA seems to have the red be less pinkish in as of the last fallâs update, which was helped by the portable LED lights that has white lights built in.
A preview on the update, I got rid of the LUTs as theyâre not needed, but modified by existing shaders. GBCâs grey ramp is now based on the snes-gamma shader and modify the values. GBA shaders uses a new gamma shader I made just for the GBA oriented shader presets. The NSO-GBC shaders are done, as it uses the modified snes-gamma shader to modify each RGB gamma ramp to match on how it looks from the NSO. All the colorspace shaders, minus the VBA, GBC-dev, and NSO-GBC ones, would have four target your displays colorspace. sRGB, DCI-P3, AdobeRGB, and Rec2020. AdobeRGB is a new addition to a target host display to show off more clue saturation levels than what sRGB or DCI-P3 can show. GBA (from Sharp display ones) and NDS can show full saturation under AdobeRGB colorspace. The PSP, GB Micro, and GBA Panasonic displays would still need Rec2020 displays in the future to see proper blue color from their original display. I added it because of how far a couple of OLED screens can reach. The Ayaneo Air 1S has an OLED display that reaches 99% coverage of both AdobeRGB and DCI-P3 from a notebookcheck website results. More will be explained later on.
Hi, @Pokefan531
A few years ago, I started researching ways to replicate DS Lite screen colors. Back then, I managed to get some results but couldnât properly verify them since I only had uncalibrated TN panels and no colorimeter.
Things have changed a bit: I still donât own a colorimeter, but I now have an M1 MacBook Pro and some smarphones, which should provide acceptable DeltaE accuracy. This brought me back to the project, where I found this forum thread.
First, congratulations on your work. After reading through many posts, I noticed some possible limitations:
- It seems there isnât a full colorspace conversion pipeline (1) (RGB â linear RGB â XYZ â chromatic adaptation â XYZ â linear RGB â RGB). I saw matrix multiplications in the shaders suggesting RGBâXYZ conversion, but without documentation Iâm unsure how recent measurements and conversions were handled, especially since tools and methods have changed over time.
- It looks like the shaders assume a fixed gamma across RGB channels which is very problematic given how unstable gamma curves are on old consoles. In fact, even a small gamma deviation (e.g., 0.15) can cause DeltaE > 3 (5), which is significant when aiming for accuracy. This issue is one of the reasons I paused my work after reading DisplayMateâs article on the DS Lite, which only included the grayscale gamma curve.
Can you clarify these two points? Fixing these issues could significantly improve shader accuracy without requiring manual tweaks.
I also saw that @pica200 shared 3DS and New 3DS XL HCFR data, which I used to create a shader with the colorspace conversion pipeline mentioned above. The 3DS top screen shader came surprisingly close to the DS Liteâs look as you also said. Seeing that result after years was incredibly rewarding. Here are the GLSL shaders (3)(4) if youâd like to try them:
- 3DS top screen: https://github.com/Brankale/Nintendo-DS-Lite-colorspace/tree/main/measurements/3DS/20241221_top_pica200/shaders
- New 3DS XL top screen: https://github.com/Brankale/Nintendo-DS-Lite-colorspace/tree/main/measurements/New%203DS%20XL/20241221_top_pica200/shaders
Could you please share the HCFR CHC output files for the consoles you measured? (2) I only saw some screenshots and would love to try them out.
Thanks again
(1) If you want to learn more about colorspaces conversions you can look at the h_ttp://brucelindbloom.com/ website.
(2) If you are interested, Iâm also developing a display measurement guideline so that everyone can follow and be aligned on the tools, the methodologies and what data needs to be measured. You can find it here: h_ttps://github.com/Brankale/Nintendo-DS-Lite-colorspace/blob/main/measurements/README.md. Be aware that the file directory can change, so if the link is broken just search in the github project.
(3) The GLSL shaders are only targeting sRGB display. I also tried DisplayP3 but the result was a washed out and greenish image. I suspect the framebuffer where the shader writes data into, is interpreted as sRGB causing color misinterpretation.
(4) In the GLSL shader thereâs also a commented line that, if enabled, visualizes out-of-gamut colors.
(5) NDS Lite colorspace gamma with 0.15 delta:
- h_ttps://github.com/Brankale/Nintendo-DS-Lite-colorspace/blob/main/gamma%20analysis/0.15%20gamma%20diff/deltaE_summary.png
- h_ttps://github.com/Brankale/Nintendo-DS-Lite-colorspace/blob/main/gamma%20analysis/0.15%20gamma%20diff/deltaE_all_colors.png