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

  • Thread starter Sono
  • Start date
  • Views 756,182
  • Replies 2,428
  • Likes 102

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 .

mhc19881010

Member
Newcomer
Joined
Jul 4, 2022
Messages
5
Trophies
0
Age
35
Location
China
XP
34
Country
China
that fix the gamma issue, I've tried with Retroarch and it makes colours less saturated. Anywya, I don't know how to apply that overlay with the patcher :S, can you give a step by step guide?
1. put the xxx.png to /SDcard/retroarch/overlay.
2. edit a .cfg file in overlay menu ( step1 ) , change the .png file name in the .cfg file to xxx.png.
3. save the step2 .cfg file as xxx.cfg.
4. in games, quick menu-onscreen overlay, choose the step3 xxx.cfg.

I don't know if I said clearly, my English is not good....
 

EduAAA

Well-Known Member
Member
Joined
Sep 3, 2017
Messages
104
Trophies
0
Age
38
XP
261
Country
Spain
1. put the xxx.png to /SDcard/retroarch/overlay.
2. edit a .cfg file in overlay menu ( step1 ) , change the .png file name in the .cfg file to xxx.png.
3. save the step2 .cfg file as xxx.cfg.
4. in games, quick menu-onscreen overlay, choose the step3 xxx.cfg.

I don't know if I said clearly, my English is not good...

I mean it for GBA native firmware. Anyway, I can't play gba without QoL that brought emulators
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
Sorry for the late reply, I have bad time management, but also very sick. Thank you all for the understanding :bow:


There is a very noticeable leap in image quality using this app over native DS titles. Do you get the same effects if you use it for GBA games or is the processing DS only?

Either way, very impressive work.

You can hold Y when booting TWPatch to access the undocumented GBA settings.

There were some extra GBA filters, but they seem to be gone from the source code, and I can't find where they went.

I'll post an update soon with some extra filters, but it will take some time due to having to recreate the filters from scratch, and my brain presence is currently way too detoriated to be able to use math to recalculate the missing filters, so it will take some time for sure.

- snip because the quote is broken -

Ah, thank you for the dual language reply, that helped me more to understand!

Nintendo's code has no support for overlays, and can't do it in hardware setting (capture card doesn't have alternating line filter, same filter is applied to every line).

There is actually a feature to flicker those pixels in your overlay, but the hardware is faulty, so can't actually reprogram the pattern.

I'll add this to the list of planned features in my replacement program.

wow, this is someone that somehow undersood something the developer of the patcher didn't think about when doing the filter
PS:Can you make a black with 50% transparency overlay for gba? that could fix the colors?

Enable redshift. There is a brightness setting, reduce that to 50% to lower the maximum pixel intensity.

Lowering the actual backlight of the display however requires some more extra patches, and a brightness level editor, which don't really exist yet.

that fix the gamma issue, I've tried with Retroarch and it makes colours less saturated. Anywya, I don't know how to apply that overlay with the patcher :S, can you give a step by step guide?
I mean it for GBA native firmware. Anyway, I can't play gba without QoL that brought emulators

Sorry, but the official Nintendo software doesn't support overlays.

I can add it to the list in my replacement though.
 

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
531
Trophies
0
Age
31
XP
951
Country
United States
Sorry for the late reply, I have bad time management, but also very sick. Thank you all for the understanding :bow:




You can hold Y when booting TWPatch to access the undocumented GBA settings.

There were some extra GBA filters, but they seem to be gone from the source code, and I can't find where they went.

I'll post an update soon with some extra filters, but it will take some time due to having to recreate the filters from scratch, and my brain presence is currently way too detoriated to be able to use math to recalculate the missing filters, so it will take some time for sure.



Ah, thank you for the dual language reply, that helped me more to understand!

Nintendo's code has no support for overlays, and can't do it in hardware setting (capture card doesn't have alternating line filter, same filter is applied to every line).

There is actually a feature to flicker those pixels in your overlay, but the hardware is faulty, so can't actually reprogram the pattern.

I'll add this to the list of planned features in my replacement program.



Enable redshift. There is a brightness setting, reduce that to 50% to lower the maximum pixel intensity.

Lowering the actual backlight of the display however requires some more extra patches, and a brightness level editor, which don't really exist yet.




Sorry, but the official Nintendo software doesn't support overlays.

I can add it to the list in my replacement though.
Do the gba filters work on injected VC cias through twpatch?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
Do the gba filters work on injected VC cias through twpatch?

TWPatch patches Nintendo's code running in legacy mode, so if it uses the native hardware built into the SoC then the filters work on it.
If it uses the GBA emulator (running in 3DS mode, not legacy mode) then it won't work.

Since VC injects are just packaged ROMs with a banner and an icon, those launch into legacy mode, which means that the patches do apply, and the games are running on genuine GBA hardware.
 

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
531
Trophies
0
Age
31
XP
951
Country
United States
TWPatch patches Nintendo's code running in legacy mode, so if it uses the native hardware built into the SoC then the filters work on it.
If it uses the GBA emulator (running in 3DS mode, not legacy mode) then it won't work.

Since VC injects are just packaged ROMs with a banner and an icon, those launch into legacy mode, which means that the patches do apply, and the games are running on genuine GBA hardware.
Thanks for always communicating with everyone man. So do you plan on rereleasing the filters in twpatch for gba vc cia injects too?
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
Thanks for always communicating with everyone man. So do you plan on rereleasing the filters in twpatch for gba vc cia injects too?

Yeah, I think I have to give up, and just recreate those three filters I had for GBA mode from my memory, and add them to the new version. I can't find them anywhere, and I remember taking like two hours to fine-tune all three so it doesn't crash on real hardware, so it'll be fun (not really) to do it again.

It also turns out that my linear filter for GBA was completely wrong, so that'll be re-made from scratch. It turns out that I was completely wrong, and Nintendo's filter for GBA is actually not linear, but some weird attempt at a sharp upscale.
 
Last edited by Sono,

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
531
Trophies
0
Age
31
XP
951
Country
United States
Yeah, I think I have to give up, and just recreate those three filters I had for GBA mode from my memory, and add them to the new version. I can't find them anywhere, and I remember taking like two hours to fine-tune all three so it doesn't crash on real hardware, so it'll be fun (not really) to do it again.

It also turns out that my linear filter for GBA was completely wrong, so that'll be re-made from scratch. It turns out that I was completely wrong, and Nintendo's filter for GBA is actually not linear, but some weird attempt at a sharp upscale.
Nice dude. Thanks as always, looking forward to gba filters, gba games look desaturated and blurry on 3DSes unfortunately
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
Nice dude. Thanks as always, looking forward to gba filters, gba games look desaturated and blurry on 3DSes unfortunately

They actually do that on purpose.

You can enable redshift, set temperature to 6500, and that should emit a default color curve to counteract the intentional desaturation.
 

Chuardo

Well-Known Member
Member
Joined
Oct 4, 2015
Messages
418
Trophies
0
Age
23
XP
1,021
Country
Uruguay
I own an Old 3DS that I changed regions from JPN to USA, I want to use TWPatcher.cia like I already did on other consoles that I didn't need to region change and it says "Can't open luma/exeTWL.bin Please decrypt exefs from CTRNAND (...) and copy it to luma/exeTWL.bin on your SDCard (...) Failed to load TwlBg, please read above" I tried to do that, I copied the file with GM9 but I don't know how to "copy it to " a .bin file and not a folder. What do I even need to do exactly? I don't even have a exeTWL.bin on my SD card "luma" folder. I own consoles that I didn't need to region change and they didn't ask me to do that when I used TWPatcher on it. I want to use Sono's crisp tweaked like I do on all my 3DSs but I can't do it with this one that I region changed.

Edit: I fixed it, I used TWLFix and redownloading missing files didn't finished completely until now
 
Last edited by Chuardo,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
I own an Old 3DS that I changed regions from JPN to USA, I want to use TWPatcher.cia like I already did on other consoles that I didn't need to region change and it says "Can't open luma/exeTWL.bin Please decrypt exefs from CTRNAND (...) and copy it to luma/exeTWL.bin on your SDCard (...) Failed to load TwlBg, please read above" I tried to do that, I copied the file with GM9 but I don't know how to "copy it to " a .bin file and not a folder. What do I even need to do exactly? I don't even have a exeTWL.bin on my SD card "luma" folder. I own consoles that I didn't need to region change and they didn't ask me to do that when I used TWPatcher on it. I want to use Sono's crisp tweaked like I do on all my 3DSs but I can't do it with this one that I region changed.

Edit: I fixed it, I used TWLFix and redownloading missing files didn't finished completely until now

I don't know what TWLFix is, but that doesn't sound too good to me that you had to use it.

Did I really forget to program an error code into the dumper? That error should not be ever displayed, unless your 3DS is really broken in software.

As for exeTWL.bin, the filename is really misleading, probably because it is a failsafe debug feature which was never intended to trigger in the first place, so the displayed "help" text is really technical.
I hope I'm remembering this right, as I can't test it at the moment:
  • SYSTEM CTRNAND/title/00040138/00000102/<something>.app
  • Mount the .app in GM9 (requires v2.0.0 or up, I think)
  • Browse to the exefs folder, and find the .firm file in there
  • Copy the file named ".firm" somewhere
  • Rename it to "exeTWL.bin"
  • Copy it to the path it asks you to do
  • Note: for GBA it's 00000202 instead, and name it exeAGB.bin
Anyway, you can also use ctrtool, just do ctrtool --exefsdir=exefs <something>.app, and the .firm file should be in the newly created exefs folder. Check the file, it should be decrypted, and say FIRM as the first four bytes in the file.
 

Chuardo

Well-Known Member
Member
Joined
Oct 4, 2015
Messages
418
Trophies
0
Age
23
XP
1,021
Country
Uruguay
I don't know what TWLFix is, but that doesn't sound too good to me that you had to use it.

Did I really forget to program an error code into the dumper? That error should not be ever displayed, unless your 3DS is really broken in software.

As for exeTWL.bin, the filename is really misleading, probably because it is a failsafe debug feature which was never intended to trigger in the first place, so the displayed "help" text is really technical.
I hope I'm remembering this right, as I can't test it at the moment:
  • SYSTEM CTRNAND/title/00040138/00000102/<something>.app
  • Mount the .app in GM9 (requires v2.0.0 or up, I think)
  • Browse to the exefs folder, and find the .firm file in there
  • Copy the file named ".firm" somewhere
  • Rename it to "exeTWL.bin"
  • Copy it to the path it asks you to do
  • Note: for GBA it's 00000202 instead, and name it exeAGB.bin
Anyway, you can also use ctrtool, just do ctrtool --exefsdir=exefs <something>.app, and the .firm file should be in the newly created exefs folder. Check the file, it should be decrypted, and say FIRM as the first four bytes in the file.
When you change your region on a 3DS console the DS Mode files don't change and they recommend using TWLFix which deletes those files and then you can redownload them via System Update so they can match the new region, it didn't finish updating when I tried the first time but I went to do a System Update again and it finished correctly and everything works just fine. Changing regions and not completing the whole process probably broke something but it's okay now so thanks
 
  • Like
Reactions: Sono

Daley87

Member
Newcomer
Joined
Mar 25, 2011
Messages
22
Trophies
0
XP
171
Country
I might be blind but I couldn’t see a download link for TWPatcher on page 1. Anyone have a link and also is there anyway to revert from the changes it makes? Cheers all
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,377
Country
Hungary
I might be blind but I couldn’t see a download link for TWPatcher on page 1. Anyone have a link and also is there anyway to revert from the changes it makes? Cheers all

Oops, I forgot to reinstate downloads. I'll reupload a build once I'm done with the new GBA filters.

As for reverting, delete /luma/sysmodules/TwlBg.cxi and /luma/sysmodules/AgbBg.cxi
 

Daley87

Member
Newcomer
Joined
Mar 25, 2011
Messages
22
Trophies
0
XP
171
Country
Oops, I forgot to reinstate downloads. I'll reupload a build once I'm done with the new GBA filters.

As for reverting, delete /luma/sysmodules/TwlBg.cxi and /luma/sysmodules/AgbBg.cxi
Thanks for the quick reply, looking forward to trying these out
 
  • Like
Reactions: Sono

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: LOL