TWPatch lets you use custom DS(i) mode scaling filters on your 3DS

twl_bricc_banner.png

Backward compatibility is always appreciated, there's no doubt about it. However, sometimes a console's implementation can be lacklustre, either due to technical difficulties or laziness on the manufacturer's part. Depending on who you ask, the 3DS' DS/DSi mode can be said to fit in either: your only options are to either play games upscaled to the 3DS' screen resolution, which includes a blurry filter that cannot be turned off, or in native res mode, which is hardly ideal as it doesn't make use of the entire screens - thus introducing big black bars all around. Due to it, some people preferred playing DS(i) titles on past consoles as it made a number of games look significantly better without any compromises.

But things are finally starting to change with the release of TWPatch made by @Sono. After lots of research and reverse engineering, he made a patcher that is able to change how TWL_FIRM's image upscaling behaves. A total of nine different scaling filters are available (not counting Nintendo's default one), several of which are able to make your games look much sharper than before! In order to give you an idea of what to expect, here is a comparison taken from the thread (made by @youny43 - left: default / right: patched) :

platsmooth.jpg platsharp.jpg

For the curious, here's a list of the included filters:
Filter list said:
  • Nintendo default
  • Sono's crisp (original patch)
  • Sono's crisp (tweaked)
  • Zero interpolation (double pixel)
  • Linear interpolation 1
  • Linear interpolation 2
  • Sharpen test 1
  • Linear sharpen 1
  • Darken crisp
  • Darken Nintendo

The patcher works on both Old and New 3DS models as long as they are running Luma CFW. You need to have enabled loading external FIRMs and modules in Luma's configuration menu, otherwise, the custom filters won't be applied. The process can take several minutes, so be sure to have enough battery charge (and patience) before proceeding. If you're unsure on which one to apply, you can preview how they'll look inside the homebrew app and compare it to Nintendo's default one.

If you want to try this yourself, make sure to read the instructions & remarks in @Sono's post before downloading (linked below).

:arrow:
Source
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,304
Country
Hungary
From the screenshot looks like trash, uneven.
I know many people despise bilinear, but is much better than uneven scaling.

Yeah, they are actually uneven. There are four full-width pixels, and then there is a pixel where 2 or 3 pixels are interpolated into a single pixel, hence making it look like trash. Some people are willing to trade away the blur for the sharpness. Personally I like the sharp one because I get sick from the blur. But yeah, contrasting all the scaling modes to Nintendo's, they did a really good job at making a default scaling mode.
 
  • Like
Reactions: Sakitoshi

Sakitoshi

GBAtemp Official Lolimaster
Member
Joined
May 8, 2012
Messages
2,256
Trophies
2
Age
33
Location
behind a keyboard or a gamepad
Website
sakiheru.blogspot.com
XP
2,911
Country
Chile
Yeah, they are actually uneven. There are four full-width pixels, and then there is a pixel where 2 or 3 pixels are interpolated into a single pixel, hence making it look like trash. Some people are willing to trade away the blur for the sharpness. Personally I like the sharp one because I get sick from the blur. But yeah, contrasting all the scaling modes to Nintendo's, they did a really good job at making a default scaling mode.
I suspected it was something like that.
the limited difference in resolution (256x192 vs 320x240) leaves no room for a better scaling algorithm, bilinear is quite literally the only "good" option. it shows why nintendo didn't even bothered to do something different.

that being said, you did what you could to make it look as good as possible even with those harsh restrictions.
 
  • Like
Reactions: Sono

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,304
Country
Hungary
I suspected it was something like that.
the limited difference in resolution (256x192 vs 320x240) leaves no room for a better scaling algorithm, bilinear is quite literally the only "good" option. it shows why nintendo didn't even bothered to do something different.

that being said, you did what you could to make it look as good as possible even with those harsh restrictions.

Actually, the only restriction at this point is my mathematical knowledge. If people could find me some scaling matrixes and/or image processing matrixes then I could port them to the matrix hardware, but I can't math out a new matrix due to my lack of mathematical knowledge. It took me an hour to recreate linear interpolation from scratch in mspaint :/ (yes, I made it in mspaint)
 
  • Like
Reactions: Sakitoshi

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,304
Country
Hungary
Thanks for all the work Sono. Wish I could help. Any chance in the future of subpixel scaling?

I just looked at it in a bit more detail, and I don't think it's possible at all. The matrix hardware can only do interpolation based on an image processing kernel, it can't do anything else. It's not programmable at all, it just does fixed-point arithmetic.
 

DSpider

Well-Known Member
Member
Joined
Mar 14, 2015
Messages
566
Trophies
0
XP
1,307
Country
Romania
If you hold down Start or Select while a DS/GBA game is booting (or rather, while the flashcart is booting), it will launch it at its native resolution. And you don't need CFW for that.

This is my preferred method because it doesn't hurt your eyes as much at night, having those black borders around. And it doesn't WASTE battery life either because A) having to upscale each frame means extra CPU strain, and B) the screen isn't fully lit because of the previously mentioned black bars (bars which you don't even notice at night I might add).

In my opinion, Nintendo should have included these filters from the get-go, along with a blue light filter and a dark night theme. I mean, they only had EIGHT YEARS to add them in an update! Leave it up to the community to follow through... Good job, Nintendo.
 
Last edited by DSpider,

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,304
Country
Hungary
If you hold down Start or Select while a DS/GBA game is booting (or rather, while the flashcart is booting), it will launch it at its native resolution. And you don't need CFW for that.

Unless you have an XL model 3DS, that's going to be way too small to view. But that's just me, I have very bad vision.

This is my preferred method because it doesn't hurt your eyes as much at night, having those black borders around. And it doesn't WASTE battery life either because A) having to upscale each frame means extra CPU strain, and B) the screen isn't fully lit because of the previously mentioned black bars (bars which you don't even notice at night I might add).

A) it's upscaled using specialized hardware, WHICH IS ON EVEN IN 1x SCALING MODE! You're not "wasting" any less battery in 1x mode :P
B) actually the opposite is true: black pixels require double the power: turning a pixel black to obstruct light requires extra power than to keep it in the "white" state, and blocking out backlight is a waste of backlight. This is TN, not (AM)OLED.

In my opinion, Nintendo should have included these filters from the get-go, along with a blue light filter and a dark night theme. I mean, they only had EIGHT YEARS to add them in an update! Leave it up to the community to follow through... Good job, Nintendo.

I am working on the blue light filters. I'm just trying to minimize the the code as much as possible to fit into the already existing space.
 
D

Deleted User

Guest
"B) actually the opposite is true: black pixels require double the power: turning a pixel black to obstruct light requires extra power than to keep it in the "white" state, and blocking out backlight is a waste of backlight. This is TN, not (AM)OLED."

Nice! So can we expect an increase in battery life!?:)
 

xxNathanxx

Well-Known Member
Member
Joined
Oct 28, 2011
Messages
403
Trophies
1
XP
533
Country
New Caledonia
(yes, I made it in mspaint)
Brilliant! Putting something together in an unorthodox way makes the end result all the more interesting.

--------------------- MERGED ---------------------------

Nice! So can we expect an increase in battery life!?:)
If/when the stretching mode is created so the top screen has less black pixels, yeah, but expect the difference in battery life to be minute - in fact, it may well be a literal minute.


Come to think of it, @Sono, would it be possible to make the black bars white?
 
  • Like
Reactions: Sono

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,304
Country
Hungary
Come to think of it, would it be possible to make the black bars white?

I have a dejavu with this question.

I know it's possible, but it requires way too much work, and has a risk of breaking the stability™ of Nintendo's fake display code.

It's not worth the hassle for me, sorry :/

--------------------- MERGED ---------------------------

"B) actually the opposite is true: black pixels require double the power: turning a pixel black to obstruct light requires extra power than to keep it in the "white" state, and blocking out backlight is a waste of backlight. This is TN, not (AM)OLED."

Nice! So can we expect an increase in battery life!?:)

No matter what you do, the battery life will be the same. The difference is immeasurable, but a black screen wastes more power than a fully white one.
 

goldensun87

Well-Known Member
Member
Joined
Jan 24, 2017
Messages
343
Trophies
0
Age
29
XP
737
Country
United States
This sounds intriguing, but I am happy playing old gen games on their respective consoles. I prefer to evade the drawbacks of "putting all my eggs in one basket".
 
  • Like
Reactions: Sono

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    S @ salazarcosplay: How are you @AncientBoi :tpi: :tpi: :tpi: :tpi: :tpi: