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

  • Thread starter Sono
  • Start date
  • Views 748,327
  • Replies 2,428
  • Likes 101

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 .

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,281
Country
GPU scaling is not necessarily better. It uses linear interpolation which makes the scaled output look rather blurry. But yes, it seems to preserve the details from the original better than other scaling techniques.
 
  • Like
Reactions: Tatti

Tatti

New Member
Newbie
Joined
Jun 18, 2022
Messages
4
Trophies
0
Age
19
Location
Home
XP
33
Country
Finland
GPU scaling is not necessarily better. It uses linear interpolation which makes the scaled output look rather blurry. But yes, it seems to preserve the details from the original better than other scaling techniques.
In my opinion if it's closer to original, it is better, but i do understand that it may look too blurry to some people
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,319
Country
Hungary
GPU scaling may draw a bit more power, which is bad for battery, I suppose.

Actually, if that's a concern, then I have some sad news to tell.

Nintendo is using THREE graphics stacks, which are so bloated and so slow that it's probably accounting for more of the power use than the actual GPU itself.

Actually, the way I implemented GPU scaling, it's probably actually using LESS power, as the capture card doesn't have to do matrix multiplication, but the image is still displayed the exact same way using Nintendo's convoluted method, so in fact it should use less power as the result of activating less silicon.

I could go into even more detail, but that would be everyone's waste of time, so I won't. But rest assured, the difference in power use is so minimal, that ENVIRONMENTAL changes (temperature, air pressure, humidity, etc.) most likely have a higher impact on possible playtime than these minute software/hardware differences.
 

Archerg

Active Member
Newcomer
Joined
Jul 30, 2018
Messages
26
Trophies
0
Age
25
XP
484
Country
United States
Hey there, I have some questions regarding the limits of twl patching and editing, but I don't want to sound rediculous with some of the things I was wondering. Who can I ask about this? Should I just ask on here?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,319
Country
Hungary
Hey there, I have some questions regarding the limits of twl patching and editing, but I don't want to sound rediculous with some of the things I was wondering. Who can I ask about this? Should I just ask on here?

I don't think many people ever did patch legacy mode. Luma has some sigpatches, but that's really it.

I guess you can ask here, or if you have a lot to ask and/or afraid to ask, then throw me a private message.
 

mhc19881010

Member
Newcomer
Joined
Jul 4, 2022
Messages
5
Trophies
0
Age
35
Location
China
XP
34
Country
China
PLEASE INCREASE OVERLAY FUNCTION

most NDS games looks blurry,
( I tried TWPatch, but not satisfied )
I can make it better by using my own OVERLAY,
( maybe just for me...)
so I hope this TITLE.
Thank you!

dmvf.png


xxgezi.png
 
Last edited by mhc19881010,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,319
Country
Hungary
PLEASE INCREASE OVERLAY FUNCTION

most NDS games looks blurry,
( I tried TWPatch, but not satisfied )
I can make it better by using my own OVERLAY,
( maybe just for me...)
so I hope this TITLE.
Thank you!

View attachment 316488

View attachment 316494

Edit: do you mean the dither pattern cause by the LCD or by the capture card? The LCD's dither pattern is most likely hidden inside an undiscovered IO register, which we didn't discover yet. The capture card has bugged dithering, which causes the exact same pattern as the 1st image, and because it's bugged, there is absolutely nothing we can do about it, besides altering the color LUT, so that the dithering is not visible on the LCD.

Sadly it's not possible with TWPatch.

The 2nd image is not possible. The capture card works on multiple lines at once, and it doesn't support alternating line image modifications, so only the 1st is possible in hardware.

In custom program (not Nintendo's code) the ARM11 has 64 CPU cycles to upscale the image for each pixel, +5863 ARM11 cycles after each pixel to finalize the image (image swap to display). Technically it would be possible to use Core1 to upscale the image while Core0 runs the drivers, but the timing is extremely strict, so many upscale filters are impossible due to not enough CPU cycles.

New3DS can be overclocked, but battery usage will degrade very strongly. There is a higher chance of having a good upscale filter on new3DS, but you need charger to play.
 
Last edited by Sono,
  • Like
Reactions: PercyRS

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,319
Country
Hungary
this is interesting, does leaving the upscaling to an overclocked core somehow allow for a better upscaling or how would that work?

It has not been done yet, but it's definitely something we can attempt to try.

Since most *good* upscaling methods need a CPU to compute the upscaling values, that means we need to overclock the ARM11, as I highly doubt that the 64 cycles per pixel available on old3DS is enough to upscale a full image, having seen some popular upscaling methods' source code in the past.

Although I just realized that CPU upscaling might be completely impossible on old3DS due to the lack of memory bandwidth. On new3DS there is an L2 cache big enough to offset the ultra slow FCRAM.

There is not enough code place to patch a test into TwlBg using TWPatch, but it might be possible to upload test code from DS mode to the ARM11 using rtcom, just to test this theory. Although it will be insanely difficult to make, because Core1 is not spawned by the kernel, and there is not enough memory besides VRAM to put the code for Core1 into, so this is a huge challange, and thus it is not something I can do in a few months of time.
 

mhc19881010

Member
Newcomer
Joined
Jul 4, 2022
Messages
5
Trophies
0
Age
35
Location
China
XP
34
Country
China
Truly thank you for your reply!
Edit: do you mean the dither pattern cause by the LCD or by the capture card? The LCD's dither pattern is most likely hidden inside an undiscovered IO register, which we didn't discover yet. The capture card has bugged dithering, which causes the exact same pattern as the 1st image, and because it's bugged, there is absolutely nothing we can do about it, besides altering the color LUT, so that the dithering is not visible on the LCD.

Sadly it's not possible with TWPatch.

The 2nd image is not possible. The capture card works on multiple lines at once, and it doesn't support alternating line image modifications, so only the 1st is possible in hardware.

In custom program (not Nintendo's code) the ARM11 has 64 CPU cycles to upscale the image for each pixel, +5863 ARM11 cycles after each pixel to finalize the image (image swap to display). Technically it would be possible to use Core1 to upscale the image while Core0 runs the drivers, but the timing is extremely strict, so many upscale filters are impossible due to not enough CPU cycles.

New3DS can be overclocked, but battery usage will degrade very strongly. There is a higher chance of having a good upscale filter on new3DS, but you need charger to play.
i think it's increasing a layer upon the original image. just like retroarch's overlay. I don't know if it's difficult , sorry...
when the dots cover the original image, it will cheat your eyes, looks better.
like this ( normal2x filter ) :
1656978667580.jpg
 
Last edited by mhc19881010,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,821
Trophies
2
Location
home
XP
9,319
Country
Hungary
Truly thank you for your reply!

i think it's increasing a layer upon the original image. just like retroarch's overlay. I don't know if it's difficult , sorry...
when the dots cover the original image, it will cheat your eyes, looks better.
like this ( normal2x filter ) :
View attachment 316632

I don't think I understand. What is an overlay? Please explain both in English and in Chinese, so I could try to understand it.

Also what game is this? I want to do image tests, and it helps if I can use source material.
 

bahamut920

Well-Known Member
Member
Joined
Jan 23, 2009
Messages
582
Trophies
1
XP
2,096
Country
United States
I don't think I understand. What is an overlay? Please explain both in English and in Chinese, so I could try to understand it.

Also what game is this? I want to do image tests, and it helps if I can use source material.
It's one of the Advance Wars games, and I'd guess Dual Strike because Days of Ruin had a post apocalyptic setting IIRC.
 

Deleted member 42501

Well-Known Member
Member
Joined
Jun 16, 2006
Messages
1,724
Trophies
2
XP
4,259
There is a very noticeable leap in image quality using this app over native DS titles. Do you get the same effects if you use it for GBA games or is the processing DS only?

Either way, very impressive work.
 

ROMANREIGNS599

Well-Known Member
Member
Joined
May 6, 2017
Messages
531
Trophies
0
Age
31
XP
951
Country
United States
It has not been done yet, but it's definitely something we can attempt to try.

Since most *good* upscaling methods need a CPU to compute the upscaling values, that means we need to overclock the ARM11, as I highly doubt that the 64 cycles per pixel available on old3DS is enough to upscale a full image, having seen some popular upscaling methods' source code in the past.

Although I just realized that CPU upscaling might be completely impossible on old3DS due to the lack of memory bandwidth. On new3DS there is an L2 cache big enough to offset the ultra slow FCRAM.

There is not enough code place to patch a test into TwlBg using TWPatch, but it might be possible to upload test code from DS mode to the ARM11 using rtcom, just to test this theory. Although it will be insanely difficult to make, because Core1 is not spawned by the kernel, and there is not enough memory besides VRAM to put the code for Core1 into, so this is a huge challange, and thus it is not something I can do in a few months of time.
Just saying. You could make one for just the new 3DS models, like the ps1 forwarder
 

mhc19881010

Member
Newcomer
Joined
Jul 4, 2022
Messages
5
Trophies
0
Age
35
Location
China
XP
34
Country
China
I don't think I understand. What is an overlay? Please explain both in English and in Chinese, so I could try to understand it.

Also what game is this? I want to do image tests, and it helps if I can use source material.
What ever games, It's GBA's ADVANCE WAR.
不管什么游戏都能用,那是GBA的高级战争。

I made a picture from your screenshot:
我用你的效果预览图做了张图:

sample.png


And OVERLAY is a layer just like this ( in PHOTOSHOP ):
OVERLAY就像是PHOTOSHOP里面的图层:

截屏2022-07-06 10.54.11.png


THANK YOU FOR YOUR REPLY!
感谢回复!

More games‘ effects:

IMG_20220706_110953.jpg

IMG_20220706_111120.jpg

IMG_20220706_111417.jpg
 
Last edited by mhc19881010,
  • Like
Reactions: Sono and Nutez

EduAAA

Well-Known Member
Member
Joined
Sep 3, 2017
Messages
104
Trophies
0
Age
38
XP
261
Country
Spain
wow, this is someone that somehow undersood something the developer of the patcher didn't think about when doing the filter
PS:Can you make a black with 50% transparency overlay for gba? that could fix the colors?
 

mhc19881010

Member
Newcomer
Joined
Jul 4, 2022
Messages
5
Trophies
0
Age
35
Location
China
XP
34
Country
China
wow, this is someone that somehow undersood something the developer of the patcher didn't think about when doing the filter
PS:Can you make a black with 50% transparency overlay for gba? that could fix the colors?
:sad:I just want to cheat my eyes, the dots may look a bit comfortable ....
Can 50% black, but maybe can not fix the color.
if the dots are 100% black, the total brightness may decrease 25%.
because it's 1/4 black dots, 3/4 empty dots.
截屏2022-07-07 12.01.29.png

Here's your 50% black:
50black.png
 

EduAAA

Well-Known Member
Member
Joined
Sep 3, 2017
Messages
104
Trophies
0
Age
38
XP
261
Country
Spain
that fix the gamma issue, I've tried with Retroarch and it makes colours less saturated. Anywya, I don't know how to apply that overlay with the patcher :S, can you give a step by step guide?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Many such cases.