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

  • Thread starter Sono
  • Start date
  • Views 488,189
  • Replies 2,007
  • Likes 90

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

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

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

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

    Votes: 9 7.9%
  • No, because I only use DS and DSi mode

    Votes: 5 4.4%

  • Total voters
    114

Dartz150

Yet another Onii-chan
Member
Joined
May 5, 2010
Messages
2,205
Trophies
1
Age
29
Location
Over your head
XP
3,644
Country
Mexico
Oh right, I forgot to edit the patching instructions stating that the addresses mentioned can be different on different firmware versions.

By my tests, it seems that the offsets only change if the console is (new)3DS or old(3DS), the firmware version can be any. This means that:

These have the same offset (please someone provide as I don't remember and I'm at work :P):
  • -3DS
  • -3DS XL
  • -2DS
Meanwhile these have the code to be patched at 4B090 :
  • -new3DS
  • -new3DS XL
  • -new2DS

In both cases the code size is 0x3C (200 bytes)

Please correct me if I'm wrong with something.
 
Last edited by Dartz150,

Retro_Mod_Gamer

Well-Known Member
Member
Joined
Nov 3, 2015
Messages
161
Trophies
0
Age
37
XP
722
Country
Canada
There is a sharpen filter which slightly enchances the differences in the image. It probably helps.



Nobody said this will only work with TWLoader. The patcher outputs the patched file to /luma/sysmodules/TwlBg.cxi
Amazing. I'm so impressed! No Rush, please don't stress yourself, and please set up a link for donations! I'd love to send you money for your hard work.
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,471
Trophies
2
Location
rehabilitation center
XP
5,660
Country
Hungary
By my tests, it seems that the offsets only change if the console is (new)3DS or old(3DS), the firmware version can be any. This means that:

These have the same offset (please someone provide as I don't remember and I'm at work :P):
  • -3DS
  • -3DS XL
  • -2DS
Meanwhile these have the code to be patched at 4B090 :
  • -new3DS
  • -new3DS XL
  • -new2DS
In both cases the code size is 0x3C (200 bytes)

Please correct me if I'm wrong with something.
These worked on my NEW 3DS XL

1.5x scaling offset is at 0xC9A.
1.25x scaling offset is at 0x4B094.

It seems like I should remove all mentions of offsets, because for me the 1.25x patterns begin at 4B094, not 4B090.

Amazing. I'm so impressed! No Rush, please don't stress yourself, and please set up a link for donations! I'd love to send you money for your hard work.

I don't have a donation link, sorry. I only have a bank account where only people who have a bank account in the country can send money to, foreigners can't.
 

Retro_Mod_Gamer

Well-Known Member
Member
Joined
Nov 3, 2015
Messages
161
Trophies
0
Age
37
XP
722
Country
Canada
It seems like I should remove all mentions of offsets, because for me the 1.25x patterns begin at 4B094, not 4B090.



I don't have a donation link, sorry. I only have a bank account where only people who have a bank account in the country can send money to, foreigners can't.

You could set up a paypal account?
 

Pickle_Rick

I'm a pickle Morty!
Member
Joined
Aug 28, 2017
Messages
630
Trophies
0
Age
25
Location
Garage
XP
1,015
Country
United States
After testing a lot of the planned scale kernels on the 3DS, I decided to scrap most of them (and will be removed after the release I'll put up in a few hours), because they actually look worse than Nintendo's own, and in contrast Nintendo did a *really* good job at making a filter which actually enchances the image.

I pulled some random filters out of my head, and whacked them in just to make this awful wait slightly more worthwhile.

26237e13c8.jpg

53f1d365bb.jpg
Can you add an option to set the default to no scaling too?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,471
Trophies
2
Location
rehabilitation center
XP
5,660
Country
Hungary
Can you add an option to set the default to no scaling too?

It has been discussed in the thread that once I release the first version I'll be slowly adding in the requested features in this thread into the patcher. And yes, that has been requested a few times, and it'll be a patch option.
 

youny43

New Member
Newbie
Joined
Feb 21, 2019
Messages
4
Trophies
0
Age
20
XP
47
Country
United States
Thanks for putting so much work into this- I searched this the other day, fed up with blurry full-size games - and to my surprise, there was an active thread with someone working on it! I eagerly await the patcher so I can try it out. Don’t work yourself too hard, though! :)
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,471
Trophies
2
Location
rehabilitation center
XP
5,660
Country
Hungary
Welp... it turns out I triggered some anti- buffer-overflow code in the kernel, which caused it to intentionally crash to prevent any "accidental" attacks against its code loader. And I tested, and the patcher works, yay!

Code compression takes a whopping 6minutes on old3DS, so make sure you only press START when you're really sure you selected the right kernel. On new3DS it should be slightly faster.

The code uses pure CPU rendering due to full-blown matrix hardware emulation, so it's going to be awfully slow, and thus unresponsive. YOU HAVE TO HOLD THE BUTTONS INSTEAD OF JUST TAPPING THEM.

The menu disappears after a few seconds if you don't press any buttons. This is intentional, so you can see the result on BOTH the top AND bottom screens.
You can keep the menu up by holding LEFT or RIGHT.

Keep holding X to temporarily switch to Nintendo's default filter. Releasing X will switch it back to the highlighted one. You can use this to check the scaling mode back and forth for visible comparison before applying.

I accidently broke the ability to switch out test images with the Y button, so I removed it for this release, because I already wasted a lot of time with the compressor. If I won't forget to fix it then the next release will allow you to switch test images with Y.

Once you press START there is no going back. You can only cancel the compression by holding down the power button. DO NOT CANCEL WHEN THERE IS A SMALL AMOUNT LEFT!

Hold SELECT to exit.

Actually not. I hope you read the above, because it contains important information!

If you read it all then congrats, you can click here to download the cia :)
You didn't read, did you?
 
Last edited by Sono,

Rahkeesh

Well-Known Member
Member
Joined
Apr 3, 2018
Messages
2,052
Trophies
1
Age
40
XP
2,456
Country
United States
Can confirm the patcher works for me on both flashcard and Twilight AFTER I turned on module loading in luma... don't forget that part. :P Crispy mode is a bit distorted but its definitely less blurry, which makes text much more readable and objects stand out from the background, so its great to have the option. I also like the just straight linear interpolation for 3D games, helps reduce the jagged edges that Nintendo's apparent sharpening effect likes to bring out.

Something to think about might be a tool that lets you swap between multiple pre-compressed files. So you only need to do the long compression once per option, then you can switch between them quickly depending on the game type. Bonus points if someone can implement the swap into NDS forwarders somehow.

Great work done here. Hoping a future version will patch GBA games too!
 
Last edited by Rahkeesh,

youny43

New Member
Newbie
Joined
Feb 21, 2019
Messages
4
Trophies
0
Age
20
XP
47
Country
United States
I used the patcher, and I love it! I used the Sono Crisp 1 and I no longer feel like my eyes are unfocused when looking into the screen of my N3DS... finally. Plus, it was easy to use. The delay for the hard work you did, Sono, was well worth the wait. Thank you very much! :)

Before:
837C8349-7C10-4E54-875D-45E78633EF47.jpeg

After:
2D00BBB7-7EF6-4DDC-A03C-CFA75F2D32F6.jpeg
 
  • Like
Reactions: Sono and RocketRobz

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,459
Trophies
1
Age
101
XP
2,985
Country
Brazil
Welp... it turns out I triggered some anti- buffer-overflow code in the kernel, which caused it to intentionally crash to prevent any "accidental" attacks against its code loader. And I tested, and the patcher works, yay!

Code compression takes a whopping 6minutes on old3DS, so make sure you only press START when you're really sure you selected the right kernel. On new3DS it should be slightly faster.

The code uses pure CPU rendering due to full-blown matrix hardware emulation, so it's going to be awfully slow, and thus unresponsive. YOU HAVE TO HOLD THE BUTTONS INSTEAD OF JUST TAPPING THEM.

The menu disappears after a few seconds if you don't press any buttons. This is intentional, so you can see the result on BOTH the top AND bottom screens.
You can keep the menu up by holding LEFT or RIGHT.

Keep holding X to temporarily switch to Nintendo's default filter. Releasing X will switch it back to the highlighted one. You can use this to check the scaling mode back and forth for visible comparison before applying.

I accidently broke the ability to switch out test images with the Y button, so I removed it for this release, because I already wasted a lot of time with the compressor. If I won't forget to fix it then the next release will allow you to switch test images with Y.

Once you press START there is no going back. You can only cancel the compression by holding down the power button. DO NOT CANCEL WHEN THERE IS A SMALL AMOUNT LEFT!

Hold SELECT to exit.

Actually not. I hope you read the above, because it contains important information!

If you read it all then congrats, you can click here to download the cia :)
You didn't read, did you?
Linear Sharpen 1 is definitely the best option.
 
  • Like
Reactions: driverdis and Sono
General chit-chat
Help Users
    3DSBricker @ 3DSBricker: That was also my first message in this chat ever