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

  • Thread starter Sono
  • Start date
  • Views 839,987
  • Replies 2,482
  • Likes 105

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 .

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
542
Trophies
0
Age
31
XP
1,045
Country
United States
Is it possible to replicate almost the same colors as a DS screen through Redshift? When I try to reduce the gamma, the colors look dirty and not bold like DS'. I really don't wanna get a DSi XL atm, cause I can't lol... Might be a misunderstanding, but redshift works much better for GBA games ran through retroarch.

Also, can Twpatcher somehow apply sharpening filters to GBA games?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,889
Trophies
2
Location
home
XP
10,091
Country
Hungary
Is it possible to replicate almost the same colors as a DS screen through Redshift? When I try to reduce the gamma, the colors look dirty and not bold like DS'. I really don't wanna get a DSi XL atm, cause I can't lol... Might be a misunderstanding, but redshift works much better for GBA games ran through retroarch.

Also, can Twpatcher somehow apply sharpening filters to GBA games?

It will not look like a DS, but it can get close-ish. Still nowhere near as good as open_agb_firm's method though.

Yes, you could apply sharpening, but for that I'll have to be loaded from the SDCard.
It's not implemented yet in the public version.
 

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
542
Trophies
0
Age
31
XP
1,045
Country
United States
It will not look like a DS, but it can get close-ish. Still nowhere near as good as open_agb_firm's method though.

Yes, you could apply sharpening, but for that I'll have to be loaded from the SDCard.
It's not implemented yet in the public version.
Thanks. I was really looking forward to playing renegade platinum on my 2DS xl but the thought of playing with washed out colors, not looking the way they are supposed to, bugs me a lot. Sadge

Are you or is someone else working on the GBA screen filters? Honestly, it’d be amazing and I can’t wait to play GBA games on my 2DS xl with a sharpening filter and redshift.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,889
Trophies
2
Location
home
XP
10,091
Country
Hungary
Thanks. I was really looking forward to playing renegade platinum on my 2DS xl but the thought of playing with washed out colors, not looking the way they are supposed to, bugs me a lot. Sadge

Are you or is someone else working on the GBA screen filters? Honestly, it’d be amazing and I can’t wait to play GBA games on my 2DS xl with a sharpening filter and redshift.

I still can't find people who would help me out with adding new features. As in, in the code. So development is halted temporarily until my heart screening (~2w away).
 
  • Like
Reactions: ROMANREIGNS599

enpeaphor

Member
Newcomer
Joined
Aug 17, 2021
Messages
20
Trophies
0
XP
566
Country
United Kingdom

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



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.

Ah okay.
How would I go about precomputing redshift curves? is it via a computer or within the TWPatcher submenu?
 

GenoCL

Well-Known Member
Member
Joined
Jan 5, 2016
Messages
316
Trophies
0
Age
33
Website
genocl.carrd.co
XP
860
Country
Chile
Hey Sono, best of luck with everything you're going through.

Excuse the dumb question but is my TWpatch correctly updated? I could swear I read somewhere that the most up to date version had more new scales (Like a "Sharp" one instead of "Sharpen Test") but these are the the ones that were there from the beginning.

I updated via Universal Updater and I can't really remember if I used the two firm patcher to get the Debit option (I guess not if it isn't there)

Edit: reading a post from you in another thread I realized that I'm indeed missing the the GBA scales, they're nowhere to be found in my picture, how can I fully update the homebrew?
I understand the grid one was just on an experimental build.
 

Attachments

  • IMG_20241011_075604.jpg
    IMG_20241011_075604.jpg
    2.6 MB · Views: 14
Last edited by GenoCL,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,889
Trophies
2
Location
home
XP
10,091
Country
Hungary
Hey Sono, best of luck with everything you're going through.

Excuse the dumb question but is my TWpatch correctly updated? I could swear I read somewhere that the most up to date version had more new scales (Like a "Sharp" one instead of "Sharpen Test") but these are the the ones that were there from the beginning.

I updated via Universal Updater and I can't really remember if I used the two firm patcher to get the Debit option (I guess not if it isn't there)

Edit: reading a post from you in another thread I realized that I'm indeed missing the the GBA scales, they're nowhere to be found in my picture, how can I fully update the homebrew?
I understand the grid one was just on an experimental build.

I don't know what is "Debit" option.

GBA is, exit TWPatch, launch TWPatch, and while TWPatch is loading, hold Y.

GBA mode might be borked in newer TWPatch, might need downgrade to 2022 version until I release new version.
 
  • Like
Reactions: Raylight

GenoCL

Well-Known Member
Member
Joined
Jan 5, 2016
Messages
316
Trophies
0
Age
33
Website
genocl.carrd.co
XP
860
Country
Chile
I don't know what is "Debit" option.

GBA is, exit TWPatch, launch TWPatch, and while TWPatch is loading, hold Y.

GBA mode might be borked in newer TWPatch, might need downgrade to 2022 version until I release new version.
My bad, my phone auto corrected. I meant Deblur.

Thanks for answering!
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,889
Trophies
2
Location
home
XP
10,091
Country
Hungary
My bad, my phone auto corrected. I meant Deblur.

Thanks for answering!

GBA scale matrixes are lost to time (some ancient archive of TWPatch has it, not current one, it's gone) :(

Also, it's not just you, I did silently edit the names of some (2 or 3 ?) filter names.
You can try "Sono's crisp (original)", "Linear sharpen 1", and "Linear interpolation 1" (or 2? I forgot which one is the less bad).

I'll try to hunt down the lost GBA scale filters too.
 
  • Like
Reactions: Raylight and GenoCL

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,889
Trophies
2
Location
home
XP
10,091
Country
Hungary
Yeah, sadly GBA scale filters are lost to time. They are completely missing from the ancient archive I have.
And now that the GBA preview is FINALLY FIXED after bajillion years, we can see, that all of them are complete junk 💀

If any of you want to try develop scale matrixes:
/tw_scale_twl.bin and /tw_scale_agb.bin are available for preview.
char[32] name is the header (only 31 usable, last character must be null), and 5*6 (DS(i)) / 6*6 (GBA) Little-Endian u16 array for matrix. It's probably easier to generate this file with a script, from some human-readable text.
Website coming soon to generate this in-browser.

Edit: just "fixed" the null-terminator crash, idk why I didn't just fix it before I even did the release
 
Last edited by Sono,

henhen

New Member
Newbie
Joined
Nov 10, 2024
Messages
2
Trophies
0
Age
25
XP
3
Country
Netherlands Antilles
Hello everyone, sorry to bother. I have an issue I cannot fix by any means... Screen Aspect Ratio option just won't show up for any DS game after applying the patch. I followed the installation guide step by step: generated TwlBg.cxi file with widescreen, moved it to sd:/_nds/TWiLightMenu/TwlBg/ and renamed it to Widescreen.cxi. I'm on the latest version of Luma (13.2.1), booted from SD card with enabled external FIRMs and modules. Latest versions of TWLight Menu and TWPatch 3DS as well, downloaded from the Universal-Updater. I tried to reinstall TWLight Menu a few times: didn't fix it... What could be the problem?
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
17,010
Trophies
3
Age
25
XP
22,015
Country
United States
Hello everyone, sorry to bother. I have an issue I cannot fix by any means... Screen Aspect Ratio option just won't show up for any DS game after applying the patch. I followed the installation guide step by step: generated TwlBg.cxi file with widescreen, moved it to sd:/_nds/TWiLightMenu/TwlBg/ and renamed it to Widescreen.cxi. I'm on the latest version of Luma (13.2.1), booted from SD card with enabled external FIRMs and modules. Latest versions of TWLight Menu and TWPatch 3DS as well, downloaded from the Universal-Updater. I tried to reinstall TWLight Menu a few times: didn't fix it... What could be the problem?
Did you scroll down in the per-game settings menu to see the setting?
Also, does the aspect ratio setting appear in TWLMenu++ Settings?
 

henhen

New Member
Newbie
Joined
Nov 10, 2024
Messages
2
Trophies
0
Age
25
XP
3
Country
Netherlands Antilles
Did you scroll down in the per-game settings menu to see the setting?
Also, does the aspect ratio setting appear in TWLMenu++ Settings?
I was trying fix it for hours and finally found a solution. It is embarrassing: this whole time my TwlBg folder was located on sd:/_nds/, not sd:/_nds/TWiLightMenu/. Did everything right except the most obvious thing, silly me. Even registered on the forum out of desperation. Everything works perfectly now. Thank you for the answer though, and sorry for being dumb🤦‍♂️
 
  • Like
Reactions: RocketRobz

V22

Member
Newcomer
Joined
Nov 13, 2024
Messages
21
Trophies
0
Age
21
XP
27
Country
United States
Based on the 3 filters (1x (START+SELECT), 1.25x (default), and 1.5x (used only in GBA mode)) found inside TWL_FIRM, I reverse engineered most of the capture card's image processor (used to capture DS and GBA screens), and made my own filters to show that sharp upscaling can be done.

But that's not all! Since the initial patcher (which was only able to change the upscaling filter), a lot of work has been done:
  • Remove the DPAD input filter, so you can press LEFT+RIGHT and UP+DOWN without it being blocked, so you can enjoy glitches exclusive to this gameplay mechanic ;)
  • Blue light filtering thanks to CTR_Redshift
  • Screen swap for DS mode (the GBA only has a single screen, so it's not swappable)
  • Widescreen patching for both DS (4:3 --> 16:10) and GBA (15:10 --> 15:9) mode
  • ARM11 <--> ARM7 communication with rtcom (discovered by @Gericom)
    • Currently only GBARunner2 utilizes this for gyroscope emulation when playing WarioWare Twisted!, but any developer and romhacker can use this for anything which needs 3DS hardware access
  • Use GPU for upscaling
    • It looks much better than the default upscaling, but it's too blurry for some people
    • It can also pose a health hazard for people with nervous system problems who get weird spazms and epilleptic effects, so use with care!
With a lot of help, love, and support from the community, there are useful use cases for the above patches:
  • TWiLightMenu++ lets you play games which have widescreen patches... in widescreen!
    • It's also possible thanks to everyone who are actively making those patches!
  • GBARunner2 uses rtcom to enable us to be able to play WarioWare Twisted! utilizing the gyroscope built into the 3DS
There are also a few patches for developers too:
  • Possible to patch Process9, Kernel11Loader, and Kernel11
  • Includes a Kernel11 patch which reinstalls exception handlers, so you can debug your payloads easier



ce64b7ec17.jpg

7b2c70e702.jpg

53f1d365bb.jpg

a215fe4708.jpg

aa87ea1b0f.jpg

364ace4046.jpg

d66eb6a763.jpg

30dbf7007b.jpg

4205de0403.jpg

a7a62e196e.jpg

f6557071b2.jpg

40909d9572.jpg

If you want to see all scale matrixes, @Halvorsen has used a capture card to capture how it looks like on real hardware.
7W9LMPP.png

[Download]


Hey Sono, I have a great idea for upscaling ds games on 3ds, which is based on TW patch. Can you please help with this. I can tell you more about it in the discord. In short, the essence of this algorithm is that the 3ds-gpu will render the image, so you can increase the resolution and maybe something else.
 

BETA215

Member not found
Member
Joined
Dec 30, 2014
Messages
422
Trophies
0
Location
they/them | 0xDEAD brain
XP
2,121
Country
Argentina
Hey Sono, I have a great idea for upscaling ds games on 3ds, which is based on TW patch. Can you please help with this. I can tell you more about it in the discord. In short, the essence of this algorithm is that the 3ds-gpu will render the image, so you can increase the resolution and maybe something else.
Maybe just explain it here? This is no trade secret, it's a community where everyone works together to build a better place. You can send messages here and they can be replied, and so on.
 
  • Like
Reactions: Sono

V22

Member
Newcomer
Joined
Nov 13, 2024
Messages
21
Trophies
0
Age
21
XP
27
Country
United States
Maybe just explain it here? This is no trade secret, it's a community where everyone works together to build a better place. You can send messages here and they can be replied, and so on.
Okay. First of all, we "break" the ds-gpu and force it to make an encoded image instead of rendering the image. And then the 3ds gpu decodes this image and renders it. And of course, we force the ds-cpu to process the image in a higher resolution. For example: ds-cpu tells ds-gpu to paint 20; 60 in blue, and instead gpu will paint 15; 10 in red. What will it mean for the arm11 gpu to "Paint blue at 20; 60" (this is in short). This is not the final option and we will need sono's help to do it. This will be a huge step forward in backward compatibility of ds on 3ds.
 
  • Like
Reactions: BETA215

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Ken, your not trapped, you just don't want to come out.
    +1
  • K3Nv2 @ K3Nv2:
    Bigonya is in the closet now he's in the closet too
    +2
  • SylverReZ @ SylverReZ:
    Nah, I'm not in the closet, only you two. :)
  • K3Nv2 @ K3Nv2:
    SylverReZ is in denial about being in the closet but he's in the closet too
    +1
  • SylverReZ @ SylverReZ:
    Ken is in denial about being in the closet but he's always been in there with Biggie.
  • K3Nv2 @ K3Nv2:
    So he pulls out his gun!
  • BigOnYa @ BigOnYa:
    I just went into the closet to look for hidden Xmas gifts, and now Ken won't let me out. Halp!
  • K3Nv2 @ K3Nv2:
    Bigonya is in denial about the closet but he can leave when he wants to too
  • BigOnYa @ BigOnYa:
    Why does it smell like baby oil in here?
  • JollyBaker @ JollyBaker:
    I have a rare condition where I piss oil, sorry
  • K3Nv2 @ K3Nv2:
    He admitted to being in the closet now he likes the closet
  • JollyBaker @ JollyBaker:
    yeah i found this closet in the woods too
  • JollyBaker @ JollyBaker:
    now i'm a closeted homosexual...
  • JollyBaker @ JollyBaker:
    minus the "ed homo"
  • JollyBaker @ JollyBaker:
    i'm a fuckin CLOSETSEXUAL BITCH
  • JollyBaker @ JollyBaker:
    someone kill me before i go too deep please
  • K3Nv2 @ K3Nv2:
    It's not about sexual orientation it's just comfy in here
  • JollyBaker @ JollyBaker:
    although i probably already did
  • JollyBaker @ JollyBaker:
    oh yeah
  • JollyBaker @ JollyBaker:
    it is comfy
  • K3Nv2 @ K3Nv2:
    Shoutbox is the closet btw
  • JollyBaker @ JollyBaker:
    idk what that is
  • JollyBaker @ JollyBaker:
    oh it's a chatroom
  • K3Nv2 @ K3Nv2:
    No it's the closet
  • JollyBaker @ JollyBaker:
    oh i see
    JollyBaker @ JollyBaker: oh i see