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

Discussion in '3DS - Homebrew Development and Emulators' started by MarcusD, Jan 9, 2018.

  1. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    Since the lookup table is stored in the GPU itself, it's cleared on reboot, or even on screeninit. It's permanent as long as the screen is not reinitialized.
     
    proflayton123 likes this.
  2. XAIXER

    XAIXER Supreme Kaiser

    Member
    2
    Mar 11, 2016
    Canada
    The Ends of Eternity
    Any way to make this carry across AGB and TWL firms?
     
  3. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    one with enough time could dedicate themselves to patching the ARM11 code, but considering the way AGB/TWL modes do their graphics, I have a feeling that it wouldn't work there :/
     
    XAIXER likes this.
  4. TCJJ

    TCJJ GBAtemp Advanced Fan

    Member
    3
    May 5, 2009
    New Zealand
    New Zealand
    This is excellent. Thanks so much @MarcusD! It's a shame it can't be added to the 3DS menu and I'd love to be able to use it with DS and GBA games, but it's so nice just to have this functionality from NTR back on 11.6 and not have to worry about the relative instability of NTR (plus extended memory games with plugins AND the blue light filter on NTR seem to cause crashing, so yay, now I should be able to have both again).

    My only suggestion would be to invert the d-pad controls (swap up & down and left & right so that the former does what the latter currently does and vice-versa) because it's a bit confusing scrolling with left and right and changing values with up and down.
    Oh, and if possible, (custom) presets would be great (but not necessary).
    EDIT: Something I forgot to suggest was being able to hold down the d-pad to scroll through numbers (it's really slow mashing the d-pad through the colour temperature, for example).
    No, it's that NTR wasn't updated to support the change, not that it's impossible (it is, I just tried on my New 3DS on 11.6 and I could make the brightness as low as NTR on <=11.4).
     
    Last edited by TCJJ, Jan 10, 2018
  5. proflayton123

    proflayton123 Sakura思い

    Member
    10
    Jan 11, 2016
    Japan
    日本
    Would it be possible to use say a .txt with the config of your desired values etc on each time you open the app? Not sure if that makes sense but thank you anyway!!
     
  6. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    This is just an example demo application. I'm pretty sure whoever will be adding this to your favorite CFW, they will make an option to save the settings which are going to be applied at boot.
     
    8BitWonder and proflayton123 like this.
  7. Justeego

    Justeego Member

    Newcomer
    1
    Feb 24, 2017
    Italy
    This is great! I wonder why nintendo doesn't release something like this since they care a lot about children. Hackers care more about people.
     
    MarcusD likes this.
  8. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    7
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    Very nice job on this! My only gripe was the banner and icon (I made alternate ones).
    Would it be stepping on toes if I put them up here? Or are you fine if I put them up?
     
  9. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    This is an example application so I'm not going to use the icon/banner, but feel free to put it up here.
     
    8BitWonder likes this.
  10. Qyriad

    Qyriad Newbie

    Newcomer
    1
    Jul 18, 2017
    United States
    Could you also post the redshift.h colorramp.h, and testimage_bin.h header files included in the source?
     
  11. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    I have linked in the source of those files in the source... also, as I stated in the main post,
     
  12. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    7
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    Here're the alt banner and icon I mentioned earlier for anyone interested.

    Screenshot + Original Images
     

    Attached Files:

    Last edited by 8BitWonder, Jan 12, 2018
    MarcusD likes this.
  13. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    the banner image supports alpha blending (transparency)
     
  14. CheatFreak47

    CheatFreak47 Complex Donut

    Member
    8
    Oct 11, 2011
    United States
    Michigan, USA
    I ended up making an SMDH for the 3dsx version with this icon I threw together in GIMP with some light editing to something from google images.

    Here's a preview image of the smdh in HBL :P

    ctrredshift_screenshot.png

    The smdh is attached.
    For those curious, my preferred setting for both screens is 3500K for just color temperature, the rest I leave as is and then exit.
     

    Attached Files:

    Last edited by CheatFreak47, Jan 16, 2018
    VinsCool, 8BitWonder and MarcusD like this.
  15. Karrq

    Karrq Newbie

    Newcomer
    1
    Jan 17, 2018
    Italy
    So a screen reinit happens when you open up the console after you have folded it again, right? Also, since this is just a demo app, you aren't making a PR on luma to add it to rosalina, correct? It would be very useful, imo! Anyways, thanks!
     
  16. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    screeninit also happens on lid open, yeah
    but it also happens when a firmlaunch happens (extended mode games, TWL_FIRM/AGB_FIRM, and rebooting back to 3DS firm also do)

    and yes, I'm too busy(?) to port this to Luma and do a PR
     
    Last edited by MarcusD, Jan 17, 2018
  17. Karrq

    Karrq Newbie

    Newcomer
    1
    Jan 17, 2018
    Italy
    I really hope someone has the time to port it! ;D Anyways, I've tested this with MHXX on my N3DSXL but it didn't reset my screen brightness (which btw GOOD JOB on making it going lower then vanilla minimum <3!) or my screen color gradient..... You said it happens in extended mode games, so doesn't it apply to mhxx ? Thanks a bunch, LOVE this feature
     
    Last edited by Karrq, Jan 17, 2018
  18. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
    actually, I just made a GUI for interfacing between Redshift and the hardware registers, the rest is done by Redshift's calculations and the GPU hardware

    the "brightness" is just an artificial brightness adjustment, it doesn't actually adjust the backlight (since that involves patching gsp), it just reduces the maximum intensity the LEDs can be lit at

    also, extended mode only applies to 192M mode on new3DS and anything that is not 64M or 72M mode on old3DS (80M and 96M do a firmlaunch)
     
  19. Karrq

    Karrq Newbie

    Newcomer
    1
    Jan 17, 2018
    Italy
    Too many modes! Where can I read about this ? I'm confused tbh
     
  20. MarcusD
    OP

    MarcusD WOODMILLS!

    Member
    9
    Oct 16, 2015
    Austria
    Austro-Hungarian Monarchy
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice