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

  • Thread starter Sono
  • Start date
  • Views 759,185
  • Replies 2,430
  • 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 .

Rahkeesh

Well-Known Member
Member
Joined
Apr 3, 2018
Messages
2,180
Trophies
1
Age
42
XP
3,268
Country
United States
Did I forget to upload the GBA bugfix?! :wacko:
You have to turn off Un-START for GPU scaling though.

*poke* I think so? I went back to your post and re-installed and its still sized wrong for GBA, Looks kind of like a 2X scale with much of the right/bottom cut off.

If you aren't done yet, take your time, but if you have it built, we'd love to try it!
 
  • Like
Reactions: Zense

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary

Rahkeesh

Well-Known Member
Member
Joined
Apr 3, 2018
Messages
2,180
Trophies
1
Age
42
XP
3,268
Country
United States
Awesome! Thanks for updating the GBA hotfix, it works great now.

This looks exactly like Retroarch's bilinear filtering, which I guess is what it is? Its not bad, but I agree a little blurrier than I would like on most games. Wonder if you have any space to apply some sharpening effect.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
Awesome! Thanks for updating the GBA hotfix, it works great now.

This looks exactly like Retroarch's bilinear filtering, which I guess is what it is? Its not bad, but I agree a little blurrier than I would like on most games. Wonder if you have any space to apply some sharpening effect.

The problem is that it's using the GPU to upscale the image, so I can't apply any filters because I'm not using the MTX to upscale.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
Well, I have some news again!

1) I was partially wrong about the double resolution patch. It's still really broken, but I think it might be possible. And regarding my previous post about this, it uses a VRAM allocator, so if I can patch 400 to 800 then the size issue shouldn't be a problem at all.

2) The GBA upscale patch is sadly fake. It turns out I'm stupid, and forgot to disable MTX for GPU upscaling. This new patcher contains the bugfixed but awfully blurry upscaler. This time it also works with widescreen too!

3) Fixed widescreen GPU scaling! Now you can use MTX widescreen and GPU widescreen too.

4) This is really important! By default, the anti-wear patch will be applied from now on to every TwlBg.cxi TWPatcher generates. You can disable it like you can disable rtcom, but it is not recommended at all. It turns out that DS(i) mode bricks when the flash inside the DS WiFi dies. That flash stores settings like username, time, touch screen callibration, and other stuff you can set in the DS BIOS on a real DS. This has been a problem since before 1.0.0 was released, hasn't been fixed in 11.6, and it's probably still present in the latest firmware. There are no checks in the code to prevent rewriting the flash if the data written is the exact same which was already there. Because of this, each time you launch into DS(i) mode, it'll write to the flash, slowly wearing it out until it can no longer hold any of the settings. This problem is only present in TWL_FIRM, so both AGB_FIRM (GBA mode firmware) and homebrew replacements (like open_agb_firm) are unaffected.

Read before downloading!

There is a new enabled-by-default patch in TWPatcher which reduces the wear on the DS WiFi flash. If you change the screen scaling with START/SELECT, recallibrate your touch screen, or change the system time, you need to hold X next time you boot into DS(i) mode, otherwise your touchscreen will be messed up. If you turn off this feature, DS(i) mode will be permanently bricked until you replace the WiFi chip, which is not possible on newer 3DS models because it's soldered onto the motherboard.

https://puu.sh/G8sEO/87b4c649e3.cia
 

Larsenic

Active Member
Newcomer
Joined
Oct 23, 2019
Messages
25
Trophies
0
XP
752
Country
Argentina
Well, I have some news again!

1) I was partially wrong about the double resolution patch. It's still really broken, but I think it might be possible. And regarding my previous post about this, it uses a VRAM allocator, so if I can patch 400 to 800 then the size issue shouldn't be a problem at all.

2) The GBA upscale patch is sadly fake. It turns out I'm stupid, and forgot to disable MTX for GPU upscaling. This new patcher contains the bugfixed but awfully blurry upscaler. This time it also works with widescreen too!

3) Fixed widescreen GPU scaling! Now you can use MTX widescreen and GPU widescreen too.

4) This is really important! By default, the anti-wear patch will be applied from now on to every TwlBg.cxi TWPatcher generates. You can disable it like you can disable rtcom, but it is not recommended at all. It turns out that DS(i) mode bricks when the flash inside the DS WiFi dies. That flash stores settings like username, time, touch screen callibration, and other stuff you can set in the DS BIOS on a real DS. This has been a problem since before 1.0.0 was released, hasn't been fixed in 11.6, and it's probably still present in the latest firmware. There are no checks in the code to prevent rewriting the flash if the data written is the exact same which was already there. Because of this, each time you launch into DS(i) mode, it'll write to the flash, slowly wearing it out until it can no longer hold any of the settings. This problem is only present in TWL_FIRM, so both AGB_FIRM (GBA mode firmware) and homebrew replacements (like open_agb_firm) are unaffected.

Read before downloading!

There is a new enabled-by-default patch in TWPatcher which reduces the wear on the DS WiFi flash. If you change the screen scaling with START/SELECT, recallibrate your touch screen, or change the system time, you need to hold X next time you boot into DS(i) mode, otherwise your touchscreen will be messed up. If you turn off this feature, DS(i) mode will be permanently bricked until you replace the WiFi chip, which is not possible on newer 3DS models because it's soldered onto the motherboard.

https://puu.sh/G8sEO/87b4c649e3.cia

Sono could you please elaborate on point 4)? I've been using the patcher with the original linear sharpen 1, so this means every time I launch in DS mode I'm rewriting the flash? In that case I suppose I have to update to this version asap. What I don't get is the part about the settings. I've never recalibrated or changed the screen scaling with START/SELECT, I've been just using the patcher for improving the image quality, no widescreen.
So if I update to this new version, must I reconfigure the settings in DS mode? or recalibrate the screen? I'm worried about the touchscreen being messed up. Sorry if I sound ignorant but I wouldn't want to damage the system by doing something wrong.

As always, thank you for your awesome work. It really improves how DS games look on the 3DS screen.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
Sono could you please elaborate on point 4)? I've been using the patcher with the original linear sharpen 1, so this means every time I launch in DS mode I'm rewriting the flash? In that case I suppose I have to update to this version asap. What I don't get is the part about the settings. I've never recalibrated or changed the screen scaling with START/SELECT, I've been just using the patcher for improving the image quality, no widescreen.
So if I update to this new version, must I reconfigure the settings in DS mode? or recalibrate the screen? I'm worried about the touchscreen being messed up. Sorry if I sound ignorant but I wouldn't want to damage the system by doing something wrong.

As always, thank you for your awesome work. It really improves how DS games look on the 3DS screen.

It seems like I must've worded it wrong, because everyone has misunderstood it so far :wacko:

Original TwlBg, no matter what you do, will always write to the WiFi flash on boot. Period. Anything you do, this write always happens, and it's not optional on an unpatched TwlBg. Holding or not holding START/SELECT has no effect either, because touch screen callibration data is also always written to the WiFi flash, no matter what. This wears out the WiFi flash unnecessarily, because it's not smart enough to filter out re-writes with the same data. If you wear out the WiFi flash enough so that the settings don't stay as you have written them, it'll permabrick* DS(i) mode.

This anti-wear patch remedies this by letting the user decide whether something doesn't work as they expect, and reboot into DS mode while holding X to fix the issues caused by not updating the WiFi flash.
Basically all the anti-wear patch does is make the WiFi flash writing optional. If you're not holding X on boot, it will not write to the WiFi flash, which is good, because this preserves its life, considering that more than 99.99% of the times the same data would've been rewritten there over and over again.
When you're in the less than 0.01% category (has recallibrated touchscreen, has changed system time, or using START/SELECT on a game which looks bad upscaled), you can just force a WiFi flash write by holding X at boot, correcting time and touchscreen callibration issues.

* A permabrick happens because the DS firmware or DS games can't read it properly, resulting in a permanent softlock. However, this is only a permabrick on 3DSes where WiFi is soldered onto the motherboard, although replacing the WiFi card is still a not-so-good idea. This also only affects DS(i) mode, because GBA mode completely bypasses DS mode, and homebrew replacements (like open_agb_firm) don't have this issue.
 
Last edited by Sono,

yuyuyup

Well-Known Member
Member
Joined
Apr 30, 2006
Messages
3,810
Trophies
2
Location
USA MTN timezone
Website
Visit site
XP
3,291
Country
United States
It seems like I must've worded it wrong, because everyone has misunderstood it so far :wacko:

Original TwlBg, no matter what you do, will always write to the WiFi flash on boot. Period. Anything you do, this write always happens, and it's not optional on an unpatched TwlBg. Holding or not holding START/SELECT has no effect either, because touch screen callibration data is also always written to the WiFi flash, no matter what. This wears out the WiFi flash unnecessarily, because it's not smart enough to filter out re-writes with the same data. If you wear out the WiFi flash enough so that the settings don't stay as you have written them, it'll permabrick* DS(i) mode.

This anti-wear patch remedies this by letting the user decide whether something doesn't work as they expect, and reboot into DS mode while holding X to fix the issues caused by not updating the WiFi flash.
Basically all the anti-wear patch does is make the WiFi flash writing optional. If you're not holding X on boot, it will not write to the WiFi flash, which is good, because this preserves its life, considering that more than 99.99% of the times the same data would've been rewritten there over and over again.
When you're in the less than 0.01% category (has recallibrated touchscreen, has changed system time, or using START/SELECT on a game which looks bad upscaled), you can just force a WiFi flash write by holding X at boot, correcting time and touchscreen callibration issues.

* A permabrick happens because the DS firmware or DS games can't read it properly, resulting in a permanent softlock. However, this is only a permabrick on 3DSes where WiFi is soldered onto the motherboard, although replacing the WiFi card is still a not-so-good idea. This also only affects DS(i) mode, because GBA mode completely bypasses DS mode, and homebrew replacements (like open_agb_firm) don't have this issue.
That is an amazing issue, with the constant rewriting. As a fan of your efforts, out of curiosity, is this a very recently discovered issue, or longstanding? Are there any known instances of bricking, what are the chances someone could brick with longterm twilight menu use (if they never discovered this new patch?) I will soon work on getting the improved widescreen going thank you very much for everything.
 

iGom

Well-Known Member
Newcomer
Joined
Jul 5, 2019
Messages
57
Trophies
0
XP
313
Country
United Kingdom
Does the link in the first post lead to the latest version of TWpatch?

Sent from my SM-N960F using Tapatalk
 

ber71

Well-Known Member
Member
Joined
Apr 24, 2019
Messages
566
Trophies
0
Age
58
XP
2,487
Country
Spain
Are unmodified 3ds affected? Running nds from a flashcart for example.
Or is it a problem just when dealing with widescreen sysmodules.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
So I should install this even if I don't want to use any filter
Are unmodified 3ds affected? Running nds from a flashcart for example.
Or is it a problem just when dealing with widescreen sysmodules.

Yes.
Preferably this patch should be installed even if the default scaling is good enough.

As I mentioned in my previous post, it's not the fault of my patches, but this problem is present on unmodified TWL_FIRM installed in factory, and even in consequent updates.

That is an amazing issue, with the constant rewriting. As a fan of your efforts, out of curiosity, is this a very recently discovered issue, or longstanding? Are there any known instances of bricking, what are the chances someone could brick with longterm twilight menu use (if they never discovered this new patch?) I will soon work on getting the improved widescreen going thank you very much for everything.

People getting bricked like this is nothing new, but we didn't really know the cause of it.

Recently it's been discovered that these writes are repeatedly happening on each boot into DS(i) mode. Because of this, frequent flashcart and TWiLightMenu++ users are at a bigger risk, especially if they have an older 3DS model, and even worse if they have the WiFi chip soldered onto the board instead of as a separate module.

Does the link in the first post lead to the latest version of TWpatch?

Nope. Good catch, I'll try to fix it later.
 

Larsenic

Active Member
Newcomer
Joined
Oct 23, 2019
Messages
25
Trophies
0
XP
752
Country
Argentina
It seems like I must've worded it wrong, because everyone has misunderstood it so far :wacko:

Original TwlBg, no matter what you do, will always write to the WiFi flash on boot. Period. Anything you do, this write always happens, and it's not optional on an unpatched TwlBg. Holding or not holding START/SELECT has no effect either, because touch screen callibration data is also always written to the WiFi flash, no matter what. This wears out the WiFi flash unnecessarily, because it's not smart enough to filter out re-writes with the same data. If you wear out the WiFi flash enough so that the settings don't stay as you have written them, it'll permabrick* DS(i) mode.

This anti-wear patch remedies this by letting the user decide whether something doesn't work as they expect, and reboot into DS mode while holding X to fix the issues caused by not updating the WiFi flash.
Basically all the anti-wear patch does is make the WiFi flash writing optional. If you're not holding X on boot, it will not write to the WiFi flash, which is good, because this preserves its life, considering that more than 99.99% of the times the same data would've been rewritten there over and over again.
When you're in the less than 0.01% category (has recallibrated touchscreen, has changed system time, or using START/SELECT on a game which looks bad upscaled), you can just force a WiFi flash write by holding X at boot, correcting time and touchscreen callibration issues.

* A permabrick happens because the DS firmware or DS games can't read it properly, resulting in a permanent softlock. However, this is only a permabrick on 3DSes where WiFi is soldered onto the motherboard, although replacing the WiFi card is still a not-so-good idea. This also only affects DS(i) mode, because GBA mode completely bypasses DS mode, and homebrew replacements (like open_agb_firm) don't have this issue.

Thanks so much for the explanation, I just learned about this problem by reading your post. That you came up with a workaround for this issue is really awesome! Updating now
 

Searinox

"Dances" with Dragons
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
As I mentioned in my previous post, it's not the fault of my patches, but this problem is present on unmodified TWL_FIRM installed in factory, and even in consequent updates.

Gee thanks Nintendildo!

So with the patch applied, if you don't press X at least once after changing NDS settings from the 3DS Settings, do the NDS settings never update? Can they diverge if I was say, to change the user etc. using the stand-alone bootable DS firmware from a flashcart or I changed the WiFi settings from within one of the games?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
Gee thanks Nintendildo!

So with the patch applied, if you don't press X at least once after changing NDS settings from the 3DS Settings, do the NDS settings never update? Can they diverge if I was say, to change the user etc. using the stand-alone bootable DS firmware from a flashcart or I changed the WiFi settings from within one of the games?

So far it seems like this only applies to time settings and touchscreen callibration (which also includes changing the screen size with START/SELECT). I tested changing my message and my user color, and that worked without holding X.

If a game changes the WiFi flash from DS mode then that gets written. If you change settings from 3DS system settings, that also gets written at that time.
 
Last edited by Sono,
  • Like
Reactions: Searinox

iGom

Well-Known Member
Newcomer
Joined
Jul 5, 2019
Messages
57
Trophies
0
XP
313
Country
United Kingdom
Yes.
Preferably this patch should be installed even if the default scaling is good enough.

As I mentioned in my previous post, it's not the fault of my patches, but this problem is present on unmodified TWL_FIRM installed in factory, and even in consequent updates.



People getting bricked like this is nothing new, but we didn't really know the cause of it.

Recently it's been discovered that these writes are repeatedly happening on each boot into DS(i) mode. Because of this, frequent flashcart and TWiLightMenu++ users are at a bigger risk, especially if they have an older 3DS model, and even worse if they have the WiFi chip soldered onto the board instead of as a separate module.



Nope. Good catch, I'll try to fix it later.
So may you sned me the link to the newest version, please?

Sent from my SM-N960F using Tapatalk
 

Searinox

"Dances" with Dragons
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,203
Country
Romania
So far it seems like this only applies to time settings and touchscreen callibration (which also includes changing the screen size with START/SELECT). I tested changing my message and my user color, and that worked without holding X.

If a game changes the WiFi flash from DS mode then that gets written. If you change settings from 3DS system settings, that also gets written at that time.
So you can now effectively decouple the clocks from the two modes huh? Might be useful for users of flashcarts with timebombs.
 
  • Like
Reactions: DSoryu and Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,828
Trophies
2
Location
home
XP
9,411
Country
Hungary
So may you sned me the link to the newest version, please?

Sent from my SM-N960F using Tapatalk

It's in the post I posted yesterday, there is a button "Spoiler: Downloads".

So you can now effectively decouple the clocks from the two modes huh? Might be useful for users of flashcarts with timebombs.

Huh, that's actually a pretty neat idea. I guess if you don't use START/SELECT then you can set time back, boot into DS mode with X held, then reboot into 3DS mode and set time back to where it was, you can temporarily defeat the timebomb.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    That is cheap, I used to pay $100 for a tine.
  • Psionic Roshambo @ Psionic Roshambo:
    Tine? One gram?
  • BigOnYa @ BigOnYa:
    Sixteenth
  • Psionic Roshambo @ Psionic Roshambo:
    Also it was literally out of a kilo when I got it off the boat so absolutely pure
  • Psionic Roshambo @ Psionic Roshambo:
    Holy shiz that's a lot
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I was getting 3.5 Grams for 320 could have stepped on it and doubled my money easy lol
    +1
  • BigOnYa @ BigOnYa:
    I'd be afraid to it nowdays, my heart would explode prob. I just stick beers n buds nowdays.
  • Psionic Roshambo @ Psionic Roshambo:
    I would get to drive from tarpon springs to like Miami a thousand bucks lol do that twice a week and back in 92 that was good money
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    @Psionic Roshambo what are you guys talking about?
  • Psionic Roshambo @ Psionic Roshambo:
    Blew it on women and muscle cars lol
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty Hamster food, its pricey nowadays to keep PCs running.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I don't do anything except cigarettes and gotta stop eventually lol
    +1
  • BigOnYa @ BigOnYa:
    I'd do shrooms again if could find, and I was outside camping/fishing, and had a cooler full of beer.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I wouldn't mind some LSD, laughing until my face hurt sounds fun lol
    +1
  • BigOnYa @ BigOnYa:
    You ever try soaper powder/qauludes? I did once and like a dumbass drank beer on top of taking, I woke up laying in my backyard in the pouring rain, it knocked me out. I have not seen it around in many many years.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    No never tried a lot of things but never that lol
  • Psionic Roshambo @ Psionic Roshambo:
    I did pass out one time on a floor after taking a bunch of Ambien lol thought it would help me sleep and did it lol
  • Psionic Roshambo @ Psionic Roshambo:
    Girlfriend was working at a pharmacy and stole like 500 of them, was and still is the biggest pill bottle I have ever seen lol
  • K3Nv2 @ K3Nv2:
    Ativan is pretty legit
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The last time I had to take something to help me sleep, I was prescribed Trazadone it was pretty OK to be honest.
  • Psionic Roshambo @ Psionic Roshambo:
    Not something I need at all these days, doing a lot better lol
  • BigOnYa @ BigOnYa:
    That Nuka Cola video with old ice grinder is cool, I want one.
    +1
    Xdqwerty @ Xdqwerty: @salazarcosplay, hi