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

  • Thread starter Thread starter Sono
  • Start date Start date
  • Views Views 982,639
  • Replies Replies 2,626
  • Likes Likes 107

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 .
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 DSoryu,
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
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.
 
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?
 
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?
 
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.
 
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! :)
 
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,
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,
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
Found a bug with the patcher.
When returning to the patcher from HOME Menu, the top screen is glitched.
 
Found a bug with the patcher.
When returning to the patcher from HOME Menu, the top screen is glitched.

That's not a bug, it's a feature :P You're not supposed to leave the patcher until you finished though, so this is a won't-fix :P
 
  • Like
Reactions: RocketRobz
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.
 

Site & Scene News

Popular threads in this forum