Real GBA and DS-Phat colors

Wow didn’t think you actually missed it lol.

Yeah, I’ve never actually used desmume to play any games, so I’m not up to snuff on its capabilities. :stuck_out_tongue:

Definitely 1080p is short for DS. I 've just tried various settings for the lcd pass / border scale parameter. 2x/1, 4x/2, 6x/0.3333… It ends up in various colors because of the sub-pixels that gets in the middle of the interpolation and you never see the horizontal lines.

Is there a nds phat for the border because it’s the only nds model to have the desaturated look with different colors. Since it’s dual screen as top and bottom, it’s very challenging to have the look of the original model since the width is too high for perfect replicated view. Maybe having the screen with portrait view instead of landscape would show more LCD details but maybe it looks better with 1440p or 4k screen.

The only 2 decent photos I could see were the one Hunterk chose and mine, no DS Phat.

And I completely agree with the portrait / 1440p landscape minimum. Anything that can display 3x: (192px vertical resolution x2 + gap) *3 1422px with a 90px gap, and with the limit of the horizontal (256px *3) resolution. On a 1080p screen 4x in portrait takes almost the whole horizontal space, not that fun for a border.

I have to say I really dislike this 2 screens design. The way Contra is made with all that stuff coming from the top screen feels so forced and unnatural, while stuff rushing you from the side is so ridiculously fast in hard difficulty. And on Yoshi Island 2 we have this old western developers “insta headache horizontal scrolling” as soon as you move in an opposite direction. Remind me of the great experience Zool, James Pond 2 or Bubsy provided me. And anyway the screen gap is always a real annoyance when both are used. Always wish I had something 16/9 when playing these kind of systems.

[QUOTE=hunterk;23523]I’ve been working on this, thought you guys might be interested: Download: http://www.mediafire.com/download/bdy9ecb9y5sdvid/nds-border.zip It depends on the ‘color mangler’ shader being in the ‘misc’ folder, as is the case with an up-to-date pull from common-shaders, but the rest should merge right in. 4x is the biggest that will fit in a 4K monitor, but I left the 5x and 6x in case anyone wants them. I will probably only push up 2x, 3x and 4x to common-shaders when the time comes.[/QUOTE]

I could of saved you the work, i made some borders about a years ago, im sure i posted them somewhere on here!!?

At the time there wasn’t a good way to adjust the width between the screens in the NDS emulator, cant this be done now?

I may release an update tomorrow. I had to recheck the nds shader with my real nds phat and it turns out it looks slightly darker when look at a very good angle perspective to an LCD monitor, and looking at parts of the LCD screen in different view angles looks lighter and slightly desaturwted , especially on poor LCD laptop monitor. The next release has a very slight change to the shader. GBA shader is fine because it was compared well with VBA-M filter many times. The GBA high shader may have a very slight adjustment for certain tones. I just have to look at the monitor at a good angle perspective to get more accurate results.

Posted a new update to have more accurate gamma and color matrix. Also please update them in the repo.

Thanks for the new version. I missed it for a while because of the ninja edit. :stuck_out_tongue:

cgwg has published back the GLSL counterpart of the v2 shader: http://pastebin.com/gDegezu6 He notes that it would have to be modified in order to work with RetroArch.

Guys! I just updated my shaders and LUT to have more accurate colors from the Real GBA hardware. The reds pop up more like the actual screen and I modify the colors to have more vivid colors that the screen has. The gammas for these shaders is slightly uppered so it’s viewable on the dark IPS panels and cheap LCD screens. OLED screen will saturate it more due to not having backlit that desaturated RGB values. I removed the NDS LUT texture due to having the shaders more accurate to the NDS-PHAT. Also, pics will be up soon.

Thanks.

The new LUT seems to be losing some details, I made a comparison picture.

Okay, thanks! I got Windows 10 now and I didn’t meet the gamma and cruve data I saved from Photoshop, but I still have a chance to fix the detail and contrast.

I updated three of the shaders and got more color and gamma accuracy. I tested the GBA for weeks and use the sunlight to see the color matrix and I had been doing some coloring fixes. Yes, the grass in Mario Kart is green, but it’s very close to what the GBA screen looks like, due to the multiple testing I did. Light Red, Green, and Blue do pop out a bit as on the screen because of how the screen works. It’s the closest to the GBA. For both GBA and NDS, the red and green are able to be exact on the sRGB, while the blue color on those system goes a bit outside of sRGB gamut (as seen on the page), but it’s very close to it as I tried several times. Due to many testing, it is the very almost exact or exact to the real console screens.

For the LUT texture, as I tried many attempts with the new colors from the latest shaders, there’s a lot of problems and discoloration that’s non-existent to the real screens, and also contrast, so I removed the last LUT and kept the one that was from May 2015.

http://www.displaymate.com/psp_ds_shootout.htm.

For the PSP 1000 and 2000, I don’t own neither of the models, so I don’t know how it goes, but I did some testing last summer with google images and try to match their gamut to have it as close as the early models. For the page, I will have to take a look at that before I actually change the PSP shader.

I agree May 2015 LUT is perhaps the best, still the one I’m using.

I can see the blue goes green for the new shaders (gba and ds as well). But every color goes a bit warm. Maybe it’s because of the sunlight and it would be different under a white light (4000K), I wonder.

The shaders don’t seem to work for me, when I select one of them all the passes from the last shader I used stay the same.

I took a look at these shaders, and it looks like you aren’t doing gamma correctly.


#define display_gamma 1.5
#define target_gamma 2.2

It looks like target_gamma is being held fixed at 2.2, which approximately describes sRGB, and display_gamma is varied among the different shaders. Then target_gamma is used at the beginning of the shader and display_gamma is used at the end:


float4 screen = pow(tex2D(s0, tex), target_gamma).rgba;
...
return pow(screen, 1.0 / display_gamma);

These two parameters are being used in the opposite way to what I would expect: [ol] [li] Convert from the emulated system’s nonlinear colour space to a linear colour space. This depends on the characteristics of the system’s screen. Thus, target_gamma should be adjusted. [/li][li] Transform from the emulated system’s RGB primaries to the sRGB primaries. In a linear colour space, this is a matrix multiplication, as is done in the shader. [/li][li] Convert to the nonlinear sRGB space. This is approximately x[sup]1/2.2[/sup]. Thus, display_gamma should be held fixed. [/li][/ol] I should mention that parameters for gamma and colour transformation are also built in to my v2 LCD shader. Since my shader places the subpixels at different locations, the result will be a bit more accurate than doing the colour transformation separately and then applying my shader.

Tatsuya79, I see some accuracies on the may 2015 one for the shader, usually the green color, but my new shader has more accurate on red and maybe blue. This week, I would have to compare both versions with the GBA hardware and see what’s the best colors for the system. The new green color is more green than my summer version, and the summer version is a bit warmer and it is close to the hardware. The reds usually pops up more from the gba hardware, and the blue color is somewhat outside from any color in sRGB color space, so I always have to increase the green color on the blue RGB value to emulate the blue color from the hardware. Both GBA and NDS shaders have the blue colors very close to the real thing, and that’s why increasing the green to match is necessary, but I also try to make it look like a blue color since these systems look more blue than what we have from sRGB. Though, I do try to view the white colors in a more white color as possible.

Also, the link I just post few days ago about NDS and PSP, and me mentioning about the nds was actually for DS Lite, but it is very close to sRGB, and there isn’t actually much a difference. The NDS Phat has the white color very slight warm tint than 6500k traditional white, but a little more on the bottom screen. I always base the colors from the top screen to have the correct color gamut.

I am reworking on the PSP Shader to have more accurate color space. I looked at the page where the gamma and color gamut was posted. Despite not owning the PSP at all, I already seen what the screen looks and what the snapshots looks. I’ll see what the GBA screen looks and I’ll post a new shader this week. I already took care of NDS shader and PSP shader so far.

One thing I should point out is that, if you simulate a nonzero black level, then some negative colours are possible to implement, since they simply reduce the black level. This makes it possible to simulate out-of-gamut colours; see here for an extreme example, where this is used to show the spectrum (washed out with a grey background).

I uploaded my newest update to these shaders. I been working on these shaders for few weeks, and I have stories about it.

I have used white light flash to the GBA screen and results are pretty accurate in the shaders. When I flashed a white light to the GBA AGB-001, the gamma lever is high with the brightest light the screen can handle. It goes about lighter than 2.2 standard gamma on the shadow parts of each game I tested. Reds do come up more as well as green, and I even fix the blue color to the shaders. The GBA hardware also has color brightness changed when I play it in a low light environment. Changing the gamma in the shaders helps the display to emulate of what it’s trying to look on different light source. I always decide to use white light as a source I stead of lights that are warm because they boost up the red colors more and makes blue color slightly darker.

Although I did test the screen for about a month, I see about 99% of GBA color space from the shaders. As I mentioned that I can’t go slightly deeper to the blue colors due to not going outside of sRGB color space, It’s pretty close and identical to the real hardware. It looks pretty much the same to the real screen, regardless of having to change the gamma from the shaders, and it is possible to see every detail in the castlevania games on the GBA screen as well as GBA-SP AGS 001.

I would like to take photos of the real GBA screen to compare with the shaders, I don’t have good cameras to show the results. They look very cheap and always have problems with light intensity and shadows. Neither of the cameras I own can’t do well with the reflection, and not even with the screens with backlight like the NDS Phat. All I can do is post snapshots from the emulator to showcase all four shaders that emulates certain screens from handheld device. I may make a video at some point to showcase it.

As for NDS and PSP, I also made the whites more whiter from the previous version, and I made the colors and gamma more accurate to the real system. The PSP shader I made are based on the documents I posted of my earlier posts in this page. For both systems, the blue colors are a bit far from sRGB, I managed to emulate them very well while the GBA blue color is a tad close to the sRGB. The PSP should be identical based on the document I found for the screen.

Also, if you happen to own these handheld devices, try testing them and see if the color space fits. I never owned GBA Micro or PSP, so I don’t know what it looks in person. It should be more accurate than what VBA-M or No$GBA has to offer, and my previous versions as well. However, a few has their preferences, and that’s why I left my last LUT shader up due to having shadow and highlight details.

The latest version of these shaders has been added to the common-shaders repository, so they will be available from online updater’s Cg shader pack.

github.com/libretro/common-shaders/tree/master/handheld