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

  • Thread starter Sono
  • Start date
  • Views 817,259
  • Replies 2,468
  • Likes 104

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 .

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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

4d1xlaan

Well-Known Member
Member
Joined
Apr 21, 2024
Messages
863
Trophies
0
XP
895
Country
United States
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

  • twl_upscaling_filter.rar
    125 bytes · Views: 34

devlman127

Well-Known Member
Newcomer
Joined
May 1, 2022
Messages
96
Trophies
0
Age
21
Location
Midwest
XP
378
Country
United States
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?
 

EobardThawne

New Member
Newbie
Joined
Jul 11, 2024
Messages
1
Trophies
0
Age
36
XP
47
Country
Indonesia
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?
 
  • Like
Reactions: 4d1xlaan

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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.
 

OmegaPikachu

Well-Known Member
Member
Joined
Mar 9, 2015
Messages
354
Trophies
0
Age
34
XP
642
Country
United States
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
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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.
 

Koorb

Member
Newcomer
Joined
Jul 18, 2024
Messages
5
Trophies
0
Age
34
XP
20
Country
France
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?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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.
 

Koorb

Member
Newcomer
Joined
Jul 18, 2024
Messages
5
Trophies
0
Age
34
XP
20
Country
France
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
 

enpeaphor

Member
Newcomer
Joined
Aug 17, 2021
Messages
20
Trophies
0
XP
526
Country
United Kingdom
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?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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.
 

enpeaphor

Member
Newcomer
Joined
Aug 17, 2021
Messages
20
Trophies
0
XP
526
Country
United Kingdom
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

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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,

DannySEP

New Member
Newbie
Joined
Sep 7, 2024
Messages
1
Trophies
0
Age
20
XP
3
Country
United States
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.
 

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
514
Trophies
0
Location
Sofa
XP
2,697
Country
United Kingdom
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
 

GoCart126

New Member
Newbie
Joined
Sep 17, 2024
Messages
1
Trophies
0
Age
21
XP
6
Country
United Kingdom
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

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,874
Trophies
2
Location
home
XP
9,859
Country
Hungary
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

General chit-chat
Help Users
  • Kirbydogs @ Kirbydogs:
    OHHH NOOOO
  • Kirbydogs @ Kirbydogs:
    Bermuda, just might as well pack everything!
  • Kirbydogs @ Kirbydogs:
    They're in the path of the hurricane!
  • BigOnYa @ BigOnYa:
    hurricane-Vertical-Video-Blog.jpg
    a hurricane sounds good to me...Yum!
  • Kirbydogs @ Kirbydogs:
    say, how do you pronounce "lol" in your head? Like, loel? L.O.L.? Laugh Out Loud?
  • BigOnYa @ BigOnYa:
    I pronounce it by holding up 2 fingers, then sticking out tongue in between fingers, and then saying lolololololol.
    +1
  • Xdqwerty @ Xdqwerty:
    People irl say i'm quite smart but I don't believe them
  • BigOnYa @ BigOnYa:
    Well that's dumb for not believing them
    +1
  • SylverReZ @ SylverReZ:
    @BigOnYa, Is that what your girlfriend enjoys in bed? :ph34r:
    +1
  • K3Nv2 @ K3Nv2:
    Being dumb? That's why she won't leave my home
    +2
  • BigOnYa @ BigOnYa:
    No ken that's my wife at your house, not my girlfriend.
  • K3Nv2 @ K3Nv2:
    So that's why Psi won't leave my home
    +1
  • Kirbydogs @ Kirbydogs:
    Of course, instead of Nintendo choosing some Kirby game, we got Ring Fit Adventure for the Nintendo Alarm Clock
  • BigOnYa @ BigOnYa:
    Kirby sucks, big time.
  • Kirbydogs @ Kirbydogs:
    @BigOnYa Yeah, thanks, that didn't hurt
  • BigOnYa @ BigOnYa:
    I mean isn't that what he does...sucks in.
  • Kirbydogs @ Kirbydogs:
    ohhhhhhhhhhhhhhhhhhhh
  • Kirbydogs @ Kirbydogs:
    r/woooosh
  • S @ salazarcosplay:
    does anyone have a hacked ps5?
  • S @ salazarcosplay:
    did anyone get splarklign zero>
  • Kirbydogs @ Kirbydogs:
    ahhh see I am a 3DS hacker and not even my uncle has a PS5 yet
  • Kirbydogs @ Kirbydogs:
    I mean, maybe one of my cousins, but, idk.
  • K3Nv2 @ K3Nv2:
    Kirby must be from Ohio with all those dogs
    K3Nv2 @ K3Nv2: Kirby must be from Ohio with all those dogs