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

  • Thread starter Thread starter Sono
  • Start date Start date
  • Views Views 101,736
  • Replies Replies 163
  • Likes Likes 44
Just switched over to Luma from Gateway (I know, I know), so you just install this using godmode?

Nope, this is a boot.firm, just replace your already existing boot.firm :P

Very odd. Just tried it on my second New 3ds XL and same behavior. Also noticed that just going back to the Redshift menu resets the bottom screen to default settings instantly, but not the top.

Oh I think I know the problem... you're releasing A too slow, and this is an oversight, my bad :P Let me fix it real fast...

EDIT: done https://puu.sh/AxWVU/a6635739b3.firm
 
Last edited by Sono,
  • Like
Reactions: zfreeman and Nutez
My favourite bit of homebrew along with your LED toggle :wub: . So nice to be able to play in the dark without burning your eyes out. Hypothetically, would it be possible to apply the screen brightness settings at startup with a button press? I'm imaging the dream scenario where you can "Hold X for night mode" and it applies screen dim/redshift/LED toggle and maybe even loads a selected nighttime theme. And/or is this something that could be done via GodMode9 script? Thanks for the great work and entertaining my naive questions haha.
 
  • Like
Reactions: Sono
My favourite bit of homebrew along with your LED toggle :wub: . So nice to be able to play in the dark without burning your eyes out. Hypothetically, would it be possible to apply the screen brightness settings at startup with a button press? I'm imaging the dream scenario where you can "Hold X for night mode" and it applies screen dim/redshift/LED toggle and maybe even loads a selected nighttime theme. And/or is this something that could be done via GodMode9 script? Thanks for the great work and entertaining my naive questions haha.

I guess I could try looking into a boot-time alternative a few days later, but it will have a slight chance of failing miserably and thus either softlocking the entire system or having a totally black screen due to the color table being all zero. I'll see what I can do :P

Also, I don't get these GM9 scripts, why would a GM9 script be able to solve everything? I seriously don't know :wacko:
 
  • Like
Reactions: CheatFreak47
I guess I could try looking into a boot-time alternative a few days later, but it will have a slight chance of failing miserably and thus either softlocking the entire system or having a totally black screen due to the color table being all zero. I'll see what I can do :P

Also, I don't get these GM9 scripts, why would a GM9 script be able to solve everything? I seriously don't know :wacko:

Black screen would use less power and I could play by sounds alone :P . Any experimentation would be greatly appreciated though, thanks :D .
I thought there was a GM9 script for changing theme at least.
 
Black screen would use less power and I could play by sounds alone :P . Any experimentation would be greatly appreciated though, thanks :D .

Sadly a blank screen wouldn't use that much less power to be noticable. I'd also have to turn off the backlight for that, but sadly that requires a gsp patch, which is still in the works.
 
Sadly a blank screen wouldn't use that much less power to be noticable. I'd also have to turn off the backlight for that, but sadly that requires a gsp patch, which is still in the works.
So the GSP module has a service for using the LCD (https://www.3dbrew.org/wiki/GSP_Services). What does GSP actually stand for though? It's bugging me and google just gives junk about GPS...
 
So the GSP module has a service for using the LCD (https://www.3dbrew.org/wiki/GSP_Services). What does GSP actually stand for though? It's bugging me and google just gives junk about GPS...

I have absolutely no ida what gsp stands for, but my guess would be "graphics service-protocol".

Also, gsp::Lcd is useless, you could do that yourself by poking some memory addresses.
 
fwiw, this might be of some help for you to see how NTR altered the backlight brightness in the past.

https://github.com/44670/NTR/issues/9

I've been able to frankenfirmware my 3DS in order to get the NTR backlight brightness function to work correctly, but that was back in January so I don't remember which CIAs I installed and what changed for it to work.
 
  • Like
Reactions: Sono
Hey MarcusD, do you think you could compile your redshift build with the latest Luma 9.1?
 
Hey MarcusD, do you think you could compile your redshift build with the latest Luma 9.1?

Sorry, I don't maintain this "plugin", I only gave a Luma build because so many people asked. It was much harder than I expected to add this into Luma, so I'd rather not go through that hell, sorry.
 
Why not just publish the source then? This implementation of brightness control/blue light filters is a lot better than the current pull request already submitted to luma.

That was just "stolen" from me, but with colorramp.(c|h) included, lol

...seriously, just compare mine to this:
- https://gist.github.com/SonoSooS/f39a50f4fd56d1c4df7f647622a76c8c#file-redshift-c-L100
- https://github.com/AuroraWright/Lum...a24c#diff-36a23845aae97f06398e865add61646fR61

Edit: lol, just noticed they finally added me into the credits
 
Wait, what about Luma and this now? something about a plugin for luma?

Due to "popular" demand I posted a build with CTR_Redshift included in a very old Luma build (7.1 or 8.0, I can't check now), but it was so difficult to do (it never booted into the Home Menu due to the color table taking up too much size) that I'd rather not try to do it again.

There is a pull request which I linked a post ago, but that doesn't let you finetune the values like my version can.
 
Due to "popular" demand I posted a build with CTR_Redshift included in a very old Luma build (7.1 or 8.0, I can't check now), but it was so difficult to do (it never booted into the Home Menu due to the color table taking up too much size) that I'd rather not try to do it again.

There is a pull request which I linked a post ago, but that doesn't let you finetune the values like my version can.
Cant really try old luma builds anyway cause I did a dumb and now im on 11.8 lol
 
So I've finally got my lazy ass around to trying to hack together an implementation of this for the new Luma. However, I'm having problems with coloramp.c:


make[1]: Entering directory '/c/Nintendo3DS/Source/Luma3DS/sysmodules/rosalina'
arm-none-eabi-gcc -Wall -Wextra -MMD -MP -marm -g -mcpu=mpcore -mfloat-abi=hard -mtp=soft -fno-builtin -std=c11 -O2 -ffast-math -mword-relocations -fomit-frame-pointer -ffunction-sections -fdata-sections -I/opt/devkitpro/libctru/include -Iinclude -DARM11 -D_3DS -c -o build/redshift/colorramp.o source/redshift/colorramp.c
source/redshift/colorramp.c: In function 'RosalinaMenu_Redshift':
source/redshift/colorramp.c:30:20: error: storage class specified for parameter 'blackbody_color'
static const float blackbody_color[] = {
^~~~~~~~~~~~~~~
source/redshift/colorramp.c:30:1: error: parameter 'blackbody_color' is initialized
static const float blackbody_color[] = {
^~~~~~
source/redshift/colorramp.c:31:2: error: incompatible types when initializing type 'const float *' using type 'double'
1.00000000, 0.18172716, 0.00000000, /* 1000K */


And


source/redshift/colorramp.c:278:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
source/redshift/colorramp.c:291:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
source/redshift/colorramp.c:312:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
source/redshift/colorramp.c:30:20: error: declaration for parameter 'blackbody_color' but no such parameter
static const float blackbody_color[] = {
^~~~~~~~~~~~~~~
source/redshift/colorramp.c:328: error: expected '{' at end of input


I'm using pretty much the exact same coloramp.c from that old screen filter implementation (https://github.com/AuroraWright/Lum...a24c#diff-36a23845aae97f06398e865add61646fR61) and I have everything up-to-date for building Luma. Am I missing something obvious that will compile this properly or do I need to actually make type changes? You can probably tell that I'm very much a rookie so any advice would be appreciated, thanks!
 
So I've finally got my lazy ass around to trying to hack together an implementation of this for the new Luma. However, I'm having problems with coloramp.

==snip==

I'm using pretty much the exact same coloramp.c from that old screen filter implementation (https://github.com/AuroraWright/Lum...a24c#diff-36a23845aae97f06398e865add61646fR61) and I have everything up-to-date for building Luma. Am I missing something obvious that will compile this properly or do I need to actually make type changes? You can probably tell that I'm very much a rookie so any advice would be appreciated, thanks!

I have absolutely no idea anymore how I did it, sorry. Try using my sources instead of someone else's, that might work better.
 

Site & Scene News

Popular threads in this forum