Homebrew CTR_Redshift - hardware-based blue light filter for old3DS and 2DS

  • Thread starter Sono
  • Start date
  • Views 87,185
  • Replies 163
  • Likes 43

AvocadoToast

Active Member
Newcomer
Joined
Jun 11, 2020
Messages
27
Trophies
0
Age
19
XP
79
Country
United States
Remember the homebrew I did almost a year ago which used the power saving mode on a new3DS to make the screen more red? Yeah, me neither :P It had many problems, almost everything got rid of the effect, and it only worked on new3DS in power saving mode because the old3DS lacks the required hardware. Also, the flicker caused me headaches, so I stopped the project there.

Well, now I fully reverse-engineered a GPU register which controls this, and thus I recreated the old design based on the new color lookup table mechanism, and it works! :D

Note: due to the characteristics of the ULCD screen, the colors will look absolutely horrible. This is not fault of the code, and thus it's not fixable. The results may differ between different models and screen types.

Note: the example demo application doesn't work in old3DS extended mode because the firmlaunch does a screeninit, resulting in the color lookup table being reset.

Note: the code is based on Redshift. The code and the example demo application is just a platform-specific wrapper around it.

Note: the example demo application uses the same TitleID as my debugger applications, so installing this will overwrite those. You have been warned!

Note: the source code isn't meant to be compiled on its own, it's just provided for education purposes. You need to alter it slightly in order to be compiled in an application.

Once you downloaded the example application, you can select which section you want to alter with the LEFT and RIGHT buttons, adjust the values using the UP and DOWN buttons (fine adjustments can be made while hoding the R or L buttons), and applying those settings to the screens with the A (bottom screen) and the B (top screen) buttons. Pressing X or Y will reset the config values to their default state, and pressing A and B will also reset the colors on the screens.

You can download the cia or the 3dsx by right clicking them then selecting the "Save as" context menu option.

Also, there are no screenshots... just see it yourself B-)

Edit: if you want to add this to Luma3DS, here is my source: https://gist.github.com/SonoSooS/d9dfd74a65f5c9ae2c13d76c2c29b5fa
If you add it into Luma then please credit me, thanks!
also can u link me a 3dsx file? there is none

--------------------- MERGED ---------------------------

You can just replace your boot.firn with that file and open Rosalina to change the settings from there.

Edit: I didn't notice there was a message below this because of the stupid ad being NOT above the text editor :angry:
how do I make it a boot.firm so I can load it in rosalina menu?
 

AvocadoToast

Active Member
Newcomer
Joined
Jun 11, 2020
Messages
27
Trophies
0
Age
19
XP
79
Country
United States
Search for TWPatch, (currently only) the exe build contains a redshift patch.
Please ignore every other question I've asked, just this one. I have TWpatch and i use widscreen with the crisp, but where in TWpatch is the redshift settings?

--------------------- MERGED ---------------------------

You're in luck, because the same UI is included in TWPatcher. It also contains other patches, like deblurring, inverting the functionality of START+SELECT (unscaled mode toggle), or enabling gyro support for GBARunner2.
I SERIOUSLY apologize for the spam, but right here I see you tell me the redshift is in TW patch, but all I see when i start TWpatch is the scale list and instructions, how do I access it?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
don't work on top ips bottom tn new 3ds xl. settings doesn't changing anything

Did you press A and B? This has to work on every 3DS, because the GPU handles the redshift, not the LCD.

I have TWpatcher and use already, but where is the gamma settings in it? Also will it load everytime I play a ds game?

Please ask in the TWPatcher thread if you have questions about it.

Currently you have to press Y + B to enter the patch menu, enable redshift, then pressing Y + B again will reveal the CTR_Redshift configurator.
After configuring, press B twice to go back to the main screen, and hold START to start the patching.

also not saying you should do it, but I'm saying you should try to do it for all these poor dual tn screeners out here XD

Sorry, I don't want any more of my code to end up in Luma3DS

how do I add it to luma 3ds? :)

I have no idea. Haven't touched Luma3DS since a long time, and I don't want to anymore.

also can u link me a 3dsx file? there is none

Sorry, I don't have neither the cia, nor the 3dsx anymore. If the cia gets taken down then I'll have to do this from scratch, because I really don't have anything left anymore. All I have is the github gist I made.

how do I make it a boot.firm so I can load it in rosalina menu?

You should already have a build environment setup with devkitARM. I sadly can't follow you through it, because all download links I used were taken down. If you had a build environment, just running "make" from the project directory should build a boot.firm.

Please ignore every other question I've asked, just this one. I have TWpatch and i use widscreen with the crisp, but where in TWpatch is the redshift settings?

As I mentioned above, it's Y + B.

I SERIOUSLY apologize for the spam, but right here I see you tell me the redshift is in TW patch, but all I see when i start TWpatch is the scale list and instructions, how do I access it?

Y + B
 
  • Like
Reactions: Julie_Pilgrim

AvocadoToast

Active Member
Newcomer
Joined
Jun 11, 2020
Messages
27
Trophies
0
Age
19
XP
79
Country
United States
Did you press A and B? This has to work on every 3DS, because the GPU handles the redshift, not the LCD.



Please ask in the TWPatcher thread if you have questions about it.

Currently you have to press Y + B to enter the patch menu, enable redshift, then pressing Y + B again will reveal the CTR_Redshift configurator.
After configuring, press B twice to go back to the main screen, and hold START to start the patching.



Sorry, I don't want any more of my code to end up in Luma3DS



I have no idea. Haven't touched Luma3DS since a long time, and I don't want to anymore.



Sorry, I don't have neither the cia, nor the 3dsx anymore. If the cia gets taken down then I'll have to do this from scratch, because I really don't have anything left anymore. All I have is the github gist I made.



You should already have a build environment setup with devkitARM. I sadly can't follow you through it, because all download links I used were taken down. If you had a build environment, just running "make" from the project directory should build a boot.firm.



As I mentioned above, it's Y + B.



Y + B
I open TWpatch (2020/02/09) and I press Y and B and there's no menu... Is there a newer version that has this? Also the website with TWpatch seems to be missing :/. If there is, can you please link me it or google drive the file over :/
 
Last edited by AvocadoToast,

EmirhanS

New Member
Newbie
Joined
Jun 17, 2020
Messages
3
Trophies
0
Age
24
XP
63
Country
Turkey
I'm an idiot. thanks but it's resetting every closing and opening the screen. if any option that saves config and applies every time when entering the homebrew would be awesome.
 

AvocadoToast

Active Member
Newcomer
Joined
Jun 11, 2020
Messages
27
Trophies
0
Age
19
XP
79
Country
United States
Did you press A and B? This has to work on every 3DS, because the GPU handles the redshift, not the LCD.



Please ask in the TWPatcher thread if you have questions about it.

Currently you have to press Y + B to enter the patch menu, enable redshift, then pressing Y + B again will reveal the CTR_Redshift configurator.
After configuring, press B twice to go back to the main screen, and hold START to start the patching.



Sorry, I don't want any more of my code to end up in Luma3DS



I have no idea. Haven't touched Luma3DS since a long time, and I don't want to anymore.



Sorry, I don't have neither the cia, nor the 3dsx anymore. If the cia gets taken down then I'll have to do this from scratch, because I really don't have anything left anymore. All I have is the github gist I made.



You should already have a build environment setup with devkitARM. I sadly can't follow you through it, because all download links I used were taken down. If you had a build environment, just running "make" from the project directory should build a boot.firm.



As I mentioned above, it's Y + B.



Y + B
So how do I access the redshift menu? Could you link me a drive with a download link to the newer version?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
I open TWpatch (2020/02/09) and I press Y and B and there's no menu... Is there a newer version that has this? Also the website with TWpatch seems to be missing :/. If there is, can you please link me it or google drive the file over :/
So how do I access the redshift menu? Could you link me a drive with a download link to the newer version?

Please ask in the TWPatch thread.

Also be more patient, I have so little time that it's possible the next time I can reply could be two weeks from my last reply.

I'm an idiot. thanks but it's resetting every closing and opening the screen. if any option that saves config and applies every time when entering the homebrew would be awesome.

As I mentioned a few messages earlier, that would require something running in the background to monitor screen power events.

As for the config saving, I forgot if it's START, SELECT, or autosave, but if you figure that out then it should be A+B to apply saved setting and hold SELECT to exit.
 

Inkadinkadoo

Well-Known Member
Newcomer
Joined
May 25, 2016
Messages
64
Trophies
0
XP
127
Country
United States
This is great, nice work! My dual ips n3dsxl had mismatching color temperatures.
Is there a DSi XL equivalent homebrew that lets you calibrate the screen color and temperature? The DSi XL has the best screens for DS games since it's the largest 1:1 screen you can play them on and they're ips as well. Really wanna calibrate my DSi XL screens too.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
This is great, nice work! My dual ips n3dsxl had mismatching color temperatures.
Is there a DSi XL equivalent homebrew that lets you calibrate the screen color and temperature? The DSi XL has the best screens for DS games since it's the largest 1:1 screen you can play them on and they're ips as well. Really wanna calibrate my DSi XL screens too.

Sorry, I don't have a DSi, and my DSLite is fried, but I don't think there is an equivalent hardware DS(i) to allow for redshift to exist.
 
  • Like
Reactions: Julie_Pilgrim

DragonW

Member
Newcomer
Joined
Sep 1, 2020
Messages
18
Trophies
0
Age
23
XP
289
Country
United States
Would it be possible to combine this version of Luma with the 10.2 one hosted on github by LumaTeam for higher screen brightness options than the 142 maximum? (I could get it 172 on that version, but only 142 on this). Thank you for implementing this, and sono for developing it!
 
  • Like
Reactions: Nutez

Nutez

Assimilator of Lumas
Member
Joined
Jan 2, 2018
Messages
175
Trophies
0
Location
The other side of paradise.
XP
1,814
Country
United Kingdom
Would it be possible to combine this version of Luma with the 10.2 one hosted on github by LumaTeam for higher screen brightness options than the 142 maximum? (I could get it 172 on that version, but only 142 on this). Thank you for implementing this, and sono for developing it!
Thanks for the feedback! Unfortunately, the only relevant change I can see in the commit history suggests that the "dubious" 172 max was a bug not a feature and will be fixed in the next official release. So I'll defer to the experts on this one and leave the fix in place.
 
  • Like
Reactions: DragonW and mh_

Nemix77

Well-Known Member
Member
Joined
May 30, 2009
Messages
851
Trophies
0
XP
757
Country
Canada
Surprisingly my refurbished New 3DS XL's screens are calibrated fairly accurate out of the box.

It's about dead on 6600K for both screens and the color gamma is about the same for both too.

Of course the top screen is always going to be slightly less bright versus the bottom screen with 3D off, they're both TN panels.

I have a couple of (professionally) calibrated monitors so I'm pretty use to seeing accurate colors.

Now the 3DS screens are nowhere near as good as my 125% SRGB monitors and the gamma shift is all over the place on both screens.

But in terms of how close enough they look to one another and the color temperature being close to 6500K, I quite happy with my screens all considering they both TN panels.

My Wii U's gamepad screen is a lot cooler in color temperature, it's about 7000K; same goes for my Switch's screen (can be fixed with homebrew on the Switch).
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
Surprisingly my refurbished New 3DS XL's screens are calibrated fairly accurate out of the box.

It's about dead on 6600K for both screens and the color gamma is about the same for both too.

Of course the top screen is always going to be slightly less bright versus the bottom screen with 3D off, they're both TN panels.

I have a couple of (professionally) calibrated monitors so I'm pretty use to seeing accurate colors.

Now the 3DS screens are nowhere near as good as my 125% SRGB monitors and the gamma shift is all over the place on both screens.

But in terms of how close enough they look to one another and the color temperature being close to 6500K, I quite happy with my screens all considering they both TN panels.

My Wii U's gamepad screen is a lot cooler in color temperature, it's about 7000K; same goes for my Switch's screen (can be fixed with homebrew on the Switch).

You'd be surprised, but there is no LCD callibration data apart from the brightness curves and the contrast bias voltage.
Even if you wanted to cal the colors, you'd be losing color information because both the LCD and the LUT are 8bits.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
does this have a schedule mode? (blue light filter on from sunset to sunrise)

Nope, need a custom background program for that, and even then it could keep crashing due to the display driver being deinited just as I would upload the new color data.
 

Deleted member 42501

Well-Known Member
Member
Joined
Jun 16, 2006
Messages
1,724
Trophies
2
XP
4,259
@Sono this is a very interesting app, especially with the latest RGB modulation effects. Is there any way of adding more variables to the mix like controlling hue, saturation and overall Gamma balance? Seeing as I'm asking the ability to store individual custom profiles would also be great but the first half is most intriguing.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,321
Country
Hungary
@Sono this is a very interesting app, especially with the latest RGB modulation effects. Is there any way of adding more variables to the mix like controlling hue, saturation and overall Gamma balance? Seeing as I'm asking the ability to store individual custom profiles would also be great but the first half is most intriguing.

Nope.

Getting the redshift alone working required reverse engineering part of the display controller so it can work on both new3DS and old3DS. Sadly there is just no hardware to do this. Not even if we had access to all hardware. There is just no hardware support (not even in the GPU!) which could allow me to adjust hue or saturation, without just re-calculating each pixel on the CPU, which is not good.

Gamma adjustments are limited too because it has limited precision which creates noticable banding if the precision drop is around 2 or 3 bits big. This happens because gamma adjustment can only be done at the final stage after the GPU has already outputted the 8bit or 5bit image, and the gamma correction table is only 8bits (contains 256 entries).

Fun fact: CTR_Redshift uses this method for redshift, meaning there are some games which will always have banding, but on some games the banding will only occur if the redshift parameters are too extreme.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-