Homebrew TWPatcher - DS(i) mode screen filters and patches

  • Thread starter Thread starter Sono
  • Start date Start date
  • Views Views 982,562
  • Replies Replies 2,626
  • Likes Likes 107

Are you interested in a complete replacement of TwlBg which includes all patches?

  • Yes, I don't care how broken it will be!

    Votes: 188 79.3%
  • No, I don't want to use even more broken stuff

    Votes: 20 8.4%
  • Yes, but only in GBA mode, because I play DSi exclusives

    Votes: 12 5.1%
  • No, because I only use DS and DSi mode

    Votes: 17 7.2%

  • Total voters
    237
  • Poll closed .
Hi, so I'm not sure if this is related but could the patch be interfering with the activity log? Because for me, Pokémon platinum has stopped tracking in the 3ds activity log, it only tracks how many times I've opened it and it shows average play time one second. All my other titles seem to track just fine, so it's just this DS one. btw love the sono's crisp filter omg so good awesome work (!!!)

It should not interfere, as I don't patch any of code that's responsible for this.
 
  • Like
Reactions: iLuvPuns
Linear sharpen 1 for use with luma 13.0 and newer, for those who might prefer to use that instead of a whole module replacement

if anyone wants a different one you make these with the code they provide, but if you arent comfortable with python or not sure how to do it anyway then let me know what filter you want and I can generate the file

https://github.com/DullPointer/TWPatch_a/blob/master/soos/krnlist_all.h#L192
https://github.com/LumaTeam/Luma3DS/blob/master/arm9/source/patches.c#L774

example for linear sharpen 1:
Code:
import struct; open("twl_upscaling_filter.bin", "wb+").write(struct.pack("<30H", 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF800, 0xF800, 0xF800, 0xF800, 0xF800, 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x4000, 0x3000, 0x2000, 0x1000, 0xF800, 0xF800, 0xF800, 0xF800, 0xF800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000))
 

Attachments

Linear sharpen 1 for use with luma 13.0 and newer, for those who might prefer to use that instead of a whole module replacement

if anyone wants a different one you make these with the code they provide, but if you arent comfortable with python or not sure how to do it anyway then let me know what filter you want and I can generate the file

https://github.com/DullPointer/TWPatch_a/blob/master/soos/krnlist_all.h#L192
https://github.com/LumaTeam/Luma3DS/blob/master/arm9/source/patches.c#L774

example for linear sharpen 1:
Code:
import struct; open("twl_upscaling_filter.bin", "wb+").write(struct.pack("<30H", 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xF800, 0xF800, 0xF800, 0xF800, 0xF800, 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x4000, 0x3000, 0x2000, 0x1000, 0xF800, 0xF800, 0xF800, 0xF800, 0xF800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000))
What's the difference between this and the filters already in twpatch?
 
Thank you for your amazing works!
Hope you have a long healthy life ahead.

Finally done reading 123 pages to make sure I didn’t miss anything important

My n3ds xl has a bit yellowish bottom screen, needs around 8500K screen temperature to match top screen 6500K screen temperature.
What is the default screen temperature when running ds? If it's 6500K as the 3ds default, then I only need to change bottom temperature to 8500K in the future release when it’s implemented right?
 
My n3ds xl has a bit yellowish bottom screen, needs around 8500K screen temperature to match top screen 6500K screen temperature.
What is the default screen temperature when running ds? If it's 6500K as the 3ds default, then I only need to change bottom temperature to 8500K in the future release when it’s implemented right?

You may not need such extreme value, but yeah, once I implement it, you'll only need to re-cal the broken screen.
 
So I just learned of this a few days ago, Is their an up to date tutorial on how to use these? I'd love to have my DS games look better lol
 
So I just learned of this a few days ago, Is their an up to date tutorial on how to use these? I'd love to have my DS games look better lol

It's been the same since the very first version.

  • use DPAD to navigate to filter
  • hold and release X to switch between Nintendo and selected filter, just for previewing
  • hold START until it starts doing its thing

However, patches did change between versions.
In the current version, you press Y+B to access the patch menu, the hold-X option has been removed. Press A to toggle them on or off.
On Redshift in particular, if you enable it, you can press Y+B again while hovering over it to alter its settings.
 
I have not read the 123 pages so I apologize if my question was already asked and answered, but is there a way to make it work with open_agb?
 
I have not read the 123 pages so I apologize if my question was already asked and answered, but is there a way to make it work with open_agb?

No, open_agb_firm is a full rewrite, so support has to be added by adding code to it.

Besides, it doesn't have any of the limitations I'm having, so it can theoretically add all requested features that I didn't dismiss as impossible in this thread, and some more.

You could ask in a GitHub issue (although read open issues and discussions first!).
However, it does have some support already, you just need to edit the .ini file in the latest version.
 
No, open_agb_firm is a full rewrite, so support has to be added by adding code to it.

Besides, it doesn't have any of the limitations I'm having, so it can theoretically add all requested features that I didn't dismiss as impossible in this thread, and some more.

You could ask in a GitHub issue (although read open issues and discussions first!).
However, it does have some support already, you just need to edit the .ini file in the latest version.
Thank you for the answer
I'll look into that, thanks
 
Is there an option within TWPatch for specific display profiles? i.e. gba or nds colour, similar to the colorProfile config found in open_agb_firm

If not, has anyone had any luck adjusting the settings in redshift to achieve a similar result?
 
Is there an option within TWPatch for specific display profiles? i.e. gba or nds colour, similar to the colorProfile config found in open_agb_firm

If not, has anyone had any luck adjusting the settings in redshift to achieve a similar result?

It's been already requested right around it got released to open_agb_firm :P

It will be released, along with the same update that makes Redshift work on both screens separately. I need to make one work to be able to add the other, so y'all get two things in one update.
 
It's been already requested right around it got released to open_agb_firm :P

It will be released, along with the same update that makes Redshift work on both screens separately. I need to make one work to be able to add the other, so y'all get two things in one update.

Ah doi - I did try to find a mention of it in the thread, obviously didn't try hard enough.
That's neat though, much appreciated. I'll stick to being patient and keep an eye out.
 
  • Like
Reactions: Sono
Ah doi - I did try to find a mention of it in the thread, obviously didn't try hard enough.
That's neat though, much appreciated. I'll stick to being patient and keep an eye out.

Oh, it was requested outside of this thread. I hope you didn't search for it too hard >.<
Post automatically merged:

Is there an option within TWPatch for specific display profiles? i.e. gba or nds colour, similar to the colorProfile config found in open_agb_firm

If not, has anyone had any luck adjusting the settings in redshift to achieve a similar result?

Oh.

I'm sorry. I was just made aware, that I was thinking of something else.

What I meant, is that you could load precomputed Redshift curves from SD (so, "PDC LUT", or individual color channel remapping, 3x256 entries), not the high-quality color profile mapping (where all color channel inputs contribute to the color channel output, 32768 entries) that open_agb_firm does.

I'm sorry for the confusion :(
It's still better than uncorrected, but it also means that it won't be as accurate as open_agb_firm.
 
Last edited by Sono,
I know somebody already posted this issue and it was solved for them, however I have no idea how they solved it.


When applying filters, they work perfectly fine when widescreen is enabled before I patch. Then when I open the game in widescreen it works ok. However, filters will not apply to any games if the aspect ratio is set to 4:3 before running them. I'm currently attempting to test how different filters work for Pokemon Platinum. I enable widescreen and the filters work fine (using one of the darker filters so the change is obvious), but once I reopen it in 4:3 it is just the default nintendo filter like always.

There is an option in the Luma configuration menu on boot that is called "Enable custom upscaling filters for dsi", although I have yet to try it and I haven't seen anybody else mention it in any tutorials I watched to try to get this to work so idk if that's related or if that's for something else.


I'm not very tech savvy when it comes to this kind of stuff, but if anybody has a solution or can help troubleshoot I would greatly appreciate it.
 
When applying filters, they work perfectly fine when widescreen is enabled before I patch. Then when I open the game in widescreen it works ok. However, filters will not apply to any games if the aspect ratio is set to 4:3 before running them.
Have you created both a widescreen and a 4:3 patched TwlBg with TWPatch? If not, TWLMenu will only load Widescreen.cxi with the filters if you set the game to widescreen. If you haven’t made a 4:3 version too (IIRC it goes in the same folder, sd:/_nds/TWiLightMenu/TwlBg/, but you don’t rename the file), it will load the stock TwlBg.cxi file, with no filters.

See https://wiki.ds-homebrew.com/twilightmenu/playing-in-widescreen
 
Yup, it is code space limitation *in Nintendo's code*.
The reason closing the lid and reopening it clears the redshift state, is that the LCD and display controller are reinitialized. And since the Redshift tables are huge (compressed!!!), I can only upload the tables on very first screeninit, before the 128MB of RAM is mapped to the DSi side or the GBA cartridge slot emulator.

There is no such limitation in my reimplementation code, and you can even change things on the fly, including widescreen mode, filters, and all that nice QoL stuff.

Ok, there IS still very heavy code space limitation regardless, but we can make homebrew *not* bloated, so we can stretch that small memory space for quite a long way.
hi, is there a way i can keep the redshift filter after closing & opening the lid when im in the ds mode of the 3ds by replacing the 3ds's dsi mode with an entirely new one somehow? if so can i please get a guide on how to do it?
 
  • Like
Reactions: devlman127
hi, is there a way i can keep the redshift filter after closing & opening the lid when im in the ds mode of the 3ds by replacing the 3ds's dsi mode with an entirely new one somehow? if so can i please get a guide on how to do it?

There is no released replacement yet.

But yeah, do not close the lid, it will not keep Redshift. The Redshift table is too big to keep.
 
  • Like
Reactions: devlman127

Site & Scene News

Popular threads in this forum