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

  • Thread starter Sono
  • Start date
  • Views 621,485
  • Replies 2,276
  • Likes 96

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

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

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

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

    Votes: 11 5.4%
  • No, because I only use DS and DSi mode

    Votes: 15 7.3%

  • Total voters
    205

RetroGen

Well-Known Member
Newcomer
Joined
Jul 17, 2022
Messages
50
Trophies
0
Location
Home
XP
360
Country
Canada
Linear Sharpen 1 seems to offer the best compromise; it does a nice job sharpening the image without losing fine detail. All the others look too pixelated, IMO. Thanks, Sono, for making this application and looking forward to the GBA filters. Not sure if possible, but it would be great if there were separate color temperature adjustments for the top and bottom screens (my N3DS XL has IPS top and TN bottom with noticeably different color temperatures).
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
Linear Sharpen 1 seems to offer the best compromise; it does a nice job sharpening the image without losing fine detail. All the others look too pixelated, IMO. Thanks, Sono, for making this application and looking forward to the GBA filters. Not sure if possible, but it would be great if there were separate color temperature adjustments for the top and bottom screens (my N3DS XL has IPS top and TN bottom with noticeably different color temperatures).

I think I had that option once, but there is not enough space sadly to fit both, as long as I remember.
 
  • Like
Reactions: RetroGen and Nutez

RetroGen

Well-Known Member
Newcomer
Joined
Jul 17, 2022
Messages
50
Trophies
0
Location
Home
XP
360
Country
Canada
I think I had that option once, but there is not enough space sadly to fit both, as long as I remember.
Thanks! If there is an old version that supports dual color temperature settings, would it be available for download anywhere? Version number? I'm unlikely to play many GBA games, so not a big deal losing that function.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
Thanks! If there is an old version that supports dual color temperature settings, would it be available for download anywhere? Version number? I'm unlikely to play many GBA games, so not a big deal losing that function.

It was a feature before I even released it to the public, but I had to cut it because of space constraints.

In fact, it was so bad that even the default colorramp just barely didn't fit into the space.

I had to make my own compression algo which exploits the incrementing nature of the colorramp, meaning that the previous color value written to the colorramp is guaranteed to be less or equal to the next value written to the colorramp.

On the other hand, I had to make the decompression code as small as possible, because the compressed colorramp data is directly appended to the end of the payload, meaning they share the same space (they have to, sadly, as there is not really space elsewhere to put any of them), so my options are severely limited.

It's a really delicate balance, and it's really hard to shave off *bits* off of the total size, let alone bytes. Adding just a single instruction means I lose around 8 to 16 color values I could've fit otherwise.
Considering how simple yet space-efficient my (de-)compression algo is, I highly doubt there exist better solutions. Because of that, the only place I could save some space is in the actual decompression algo itself, or perhaps by re-arranging the data some way to make it more space-efficient by a few bits, but then again, it's a really delicate balance, and there is extremely little gain to extremely big effort, so I'm kind of afraid to touch it at this point.
 
  • Like
Reactions: RetroGen

tygh3902

New Member
Newbie
Joined
Aug 9, 2022
Messages
1
Trophies
0
Age
23
Location
fourside
XP
12
Country
Australia
I've followed the install guide and got widescreen and the crisp filter working on a widescreen compatible game (DQV), but I've not been able to get screen filters working in non-widescreen games. Any idea?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
I've followed the install guide and got widescreen and the crisp filter working on a widescreen compatible game (DQV), but I've not been able to get screen filters working in non-widescreen games. Any idea?

Depends on what patches you're using.

GPU scaling is strictly linear upscaling, as it's done only by the GPU, and it doesn't really support anything else.

Scale matrixes only work with the built-in capture card.
However, due to the mathematical complexity of the upscale matrixes, I opted to disable scaling for the X axis in widescreen mode, and only let it to be applied to the Y axis (you can see if you look really close, that changing the matrixes does indeed somewhat change how the overall image looks).

Technically there is only mathematics stopping me from making the upscale matrixes widescreen-compatible. Some could be probably "just upscaled", but the others must be recreated from scratch due to their complexity.
The only downside to supporting widescreen upscaling matrix is that pixel perfect mode (START/SELECT on boot) might be garbled, and/or hang, unless I patch out some unrelated functions.
 
  • Like
Reactions: ROMANREIGNS599

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
So the filter that's closest to "Nearest Neighbor" is "Sono's Crisp" or Zero Interpolation? I don't mind the pixelated look and would rather have a clearer image.

You can see that youself by changing between the filters.

"Nearest neighbor" is written as "Linear interpolation 1" in the filter menu.
If you don't like that, then try "Linear sharpen 1", or if it looks the same to you, then try "Sono's crisp (original patch)". Alternatively there is "Sharpen test 1", but it looks disgusting at times.

There is also an undocumented feature I just remembered: you can use X + DPAD to switch between test patterns. Also if you let the menu time out, you can hold X to switch between the current filter and Nintendo's filter, to see the difference between the default and the selected filter.

Oh, and there is a really visually interesting bug caused by the pattern switch code: sometimes it's possible to trigger "wood mode", where both screens turn into a laminated wood floor pattern. I forgot how to do that, but I don't remember it being too difficult to trigger.
 
  • Like
Reactions: LinkmstrYT

LinkmstrYT

( ͡° ͜ʖ ͡°)
Member
Joined
Dec 16, 2013
Messages
1,750
Trophies
1
Location
You wanted to see where I live? You stalker...
XP
3,094
Country
United States
You can see that youself by changing between the filters.

"Nearest neighbor" is written as "Linear interpolation 1" in the filter menu.
If you don't like that, then try "Linear sharpen 1", or if it looks the same to you, then try "Sono's crisp (original patch)". Alternatively there is "Sharpen test 1", but it looks disgusting at times.

There is also an undocumented feature I just remembered: you can use X + DPAD to switch between test patterns. Also if you let the menu time out, you can hold X to switch between the current filter and Nintendo's filter, to see the difference between the default and the selected filter.

Oh, and there is a really visually interesting bug caused by the pattern switch code: sometimes it's possible to trigger "wood mode", where both screens turn into a laminated wood floor pattern. I forgot how to do that, but I don't remember it being too difficult to trigger.
Alright, will test them around.

Nice to see that there's a hidden feature and an easter egg-like bug.
 

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
734
Trophies
0
Age
32
XP
1,223
Country
Argentina
Sorry to ask something without reading, perhaps this was answered a long time ago, but it's 108 pages!!

Anyways, i'm not getting widescreen anymore. TBH i haven't noticed exactly when or why, i assume it was my luma update from 10.14 or something, to 11.00.
Is that possible or am i tripping? I did re-apply the patches holding X for widescreen mode, twice actually, and it doesn't seem to work. What i didn't try tbh is using some other more noticeable filter to see if the filters work at all, or if its just widescreen
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,259
Trophies
1
Age
21
Location
米国
Website
pk11.us
XP
3,595
Country
United States
Sorry to ask something without reading, perhaps this was answered a long time ago, but it's 108 pages!!

Anyways, i'm not getting widescreen anymore. TBH i haven't noticed exactly when or why, i assume it was my luma update from 10.14 or something, to 11.00.
Is that possible or am i tripping? I did re-apply the patches holding X for widescreen mode, twice actually, and it doesn't seem to work. What i didn't try tbh is using some other more noticeable filter to see if the filters work at all, or if its just widescreen
Is "External FIRMs and Modules" enabled in Luma settings? Updating Luma always resets all the settings.

Also, TWiLight Menu++ might be automatically disabling that now. Not sure if it'll disable it if it wasn't the one that enabled it but I know TWiLight edits the ini to enable it automatically now.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
Sorry to ask something without reading, perhaps this was answered a long time ago, but it's 108 pages!!

Anyways, i'm not getting widescreen anymore. TBH i haven't noticed exactly when or why, i assume it was my luma update from 10.14 or something, to 11.00.
Is that possible or am i tripping? I did re-apply the patches holding X for widescreen mode, twice actually, and it doesn't seem to work. What i didn't try tbh is using some other more noticeable filter to see if the filters work at all, or if its just widescreen

I thought I have made it properly, but I guess not. When you hold X, it should actually error out that this button combo is not supported anymore due to the confusion it caused (people kept pressing START+X instead of X+START), so now you're forced to enable it from the patch menu.

Also please use the latest version, as previous versions had ultra broken widescreen.
 

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
734
Trophies
0
Age
32
XP
1,223
Country
Argentina
now you're forced to enable it from the patch menu.
how do i do that? is the link to an updated version on page 1?
i'll update ASAP, as i really liked bilinear filtered widescreen

edit: i'll also check the "external firm and modules" in case it was resetted into being disabled. I assumed it would've kept my settings. I found some mirror for TWpatcher if anyone confrims the date of last version i'll go ahead with it
 
Last edited by placebo_yue,

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,259
Trophies
1
Age
21
Location
米国
Website
pk11.us
XP
3,595
Country
United States
how do i do that? is the link to an updated version on page 1?
i'll update ASAP, as i really liked bilinear filtered widescreen

edit: i'll also check the "external firm and modules" in case it was resetted into being disabled. I assumed it would've kept my settings. I found some mirror for TWpatcher if anyone confrims the date of last version i'll go ahead with it
There's an official download again: https://gbatemp.net/download/twpatch.37400/

I guess the OP just hasn't been updated, that's the version used on Universal-DB and thus Universal-Updater so getting from either of those is also up to date.
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
how do i do that? is the link to an updated version on page 1?
i'll update ASAP, as i really liked bilinear filtered widescreen

edit: i'll also check the "external firm and modules" in case it was resetted into being disabled. I assumed it would've kept my settings. I found some mirror for TWpatcher if anyone confrims the date of last version i'll go ahead with it

In the scale matrix selector menu, press Y+B (not B+Y), navigate to the widescreen patch, press A to check it, B to return to the scale matrixes menu, and then hold START to start the patching.

There's an official download again: https://gbatemp.net/download/twpatch.37400/

I guess the OP just hasn't been updated, that's the version used on Universal-DB and thus Universal-Updater so getting from either of those is also up to date.

Heh oops, thanks for the heads-up! Added it to first post.
 
  • Like
Reactions: placebo_yue

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
734
Trophies
0
Age
32
XP
1,223
Country
Argentina
In the scale matrix selector menu, press Y+B (not B+Y), navigate to the widescreen patch, press A to check it, B to return to the scale matrixes menu, and then hold START to start the patching.
I updated, did all that but my DS games are still not widescreen :(
what else could be wrong?
Nevermind i forgot to allow FIRM and Modules thingy on luma. It's probably gonna work this time. Will report if not
 

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
37
XP
132
Country
Belgium
Meanwhile, I'm still waiting for a patch that automatically shows my GBA and DSiWare games in pixel-perfect mode without having to hold Start or Select. Every. Single. Time. That I boot them up. It was proposed as an option in Luma, but was rejected in favor of more TWLBg research. Now that such research is done, can I please have this option somehow?
 

Stellar

Well-Known Member
Member
Joined
Jul 20, 2014
Messages
160
Trophies
0
XP
1,404
Country
Portugal
Meanwhile, I'm still waiting for a patch that automatically shows my GBA and DSiWare games in pixel-perfect mode without having to hold Start or Select. Every. Single. Time. That I boot them up. It was proposed as an option in Luma, but was rejected in favor of more TWLBg research. Now that such research is done, can I please have this option somehow?
That is already an option with TWPatcher.
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
Meanwhile, I'm still waiting for a patch that automatically shows my GBA and DSiWare games in pixel-perfect mode without having to hold Start or Select. Every. Single. Time. That I boot them up. It was proposed as an option in Luma, but was rejected in favor of more TWLBg research. Now that such research is done, can I please have this option somehow?

I think I even renamed the patch, so it's more clear. It was named "UnSTART", although no idea what it's named now.

Either way, it's in the patch menu.
 
  • Like
Reactions: Nutez
General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
  • Psionic Roshambo @ Psionic Roshambo:
    Do the Mario lol
  • K3N1 @ K3N1:
    🍑
  • K3N1 @ K3N1:
    Whoever developed Bramble was smoking that good shit fucking gnomes
    K3N1 @ K3N1: Whoever developed Bramble was smoking that good shit fucking gnomes