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

  • Thread starter Sono
  • Start date
  • Views 745,744
  • 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 .

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
@Sono That's true, I know Mario 64 DS runs at 30FPS anyway (there is a 60FPS hack available), so in theory you wouldn't be losing anything by having it run at 30FPS on 3DS. Something like Mario Kart DS which is originally 60FPS would definitely be severely impacted.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
Sono, once again, incredible work. I have a suggestion. Is it possible to also map the ABXY buttons to the "c-stick"? This would allow for dual analog support in games like Metroid Prime Hunters.

There is not enough code space, and I don't know the protocoll for the C-Stick, sorry :/ The fake input is already kinda complex, let alone adding a new input method.

@Sono That's true, I know Mario 64 DS runs at 30FPS anyway (there is a 60FPS hack available), so in theory you wouldn't be losing anything by having it run at 30FPS on 3DS. Something like Mario Kart DS which is originally 60FPS would definitely be severely impacted.

Welp... in that case it was displaying at 15FPS, not 30FPS. The game still runs unaffected, but the patch messes with the timings, so it misses two VBlanks.
 
  • Like
Reactions: DSoryu

deisuke1234

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
108
Trophies
0
Age
29
XP
1,628
Country
@Sono incredible work of yours. I just wonder something if you stretch the resolution let say to 370 and not to 380 would it still get this FPS issue?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
@Sono incredible work of yours. I just wonder something if you stretch the resolution let say to 370 and not to 380 would it still get this FPS issue?

Trying to add a custom resolution is the culprit. Just using the already existing 1.5x scale mode works just fine, but anything beyond the 3 resolutions included in the binary will result in bad side effects :/
 

Reynardine

Fuchsly
Member
Joined
Aug 14, 2018
Messages
520
Trophies
1
Location
Negativland
XP
1,295
Country
Germany
I'd still like to see a widescreen option if you think it is worth the effort!
I've been wanting this for so long, I could live with the tradeoff if it doesn't affect games to the point of being unplayable.

Would using the CPU boost in TwilightMenu++ help against the slowdown or is that unrelated to this problem?
 
  • Like
Reactions: Nutez and Sono

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
Trying to add a custom resolution is the culprit. Just using the already existing 1.5x scale mode works just fine, but anything beyond the 3 resolutions included in the binary will result in bad side effects :/
This is interesting to me, since the widescreen resolution you're shooting for (384*240) is smaller than that used by the 1.5x scaling mode. (384*288). EDIT: So it's not that the 3DS can't handle that high of a resolution, just ... not this specific one? /EDIT

Out of interest, which of the three modes are you working from when attempting to build the 384*240 mode? Are you replacing the 1.25x scale, or the 1.5x? It seems like the 1.5x scale is "closer" to what you're trying to achieve--maybe the 3DS would handle it better using whatever values it hardcodes for that mode, compared to the 320*240 mode?
 
Last edited by Vague Rant,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
This is interesting to me, since the widescreen resolution you're shooting for (384*240) is smaller than that used by the 1.5x scaling mode. (384*288). EDIT: So it's not that the 3DS can't handle that high of a resolution, just ... not this specific one? /EDIT

Out of interest, which of the three modes are you working from when attempting to build the 384*240 mode? Are you replacing the 1.25x scale, or the 1.5x? It seems like the 1.5x scale is "closer" to what you're trying to achieve--maybe the 3DS would handle it better using whatever values it hardcodes for that mode, compared to the 320*240 mode?

It's not smaller. I reverse engineered the matrix hardware enough, and figured out how to scale the X axis independently of Y.

Also yeah, the patches I used (until now) skipped two VBlanks.
The patch I'm working on might be able to actually stretch the top screen at the expense of slightly distorting the bottom screen, with no VSync skip penalty.

I'm using the 320x240 one because the 1.5x mode requires extra patching, and it also affects the bottom screen, which is a no-no.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
Well, this was fast... I did it for GBA mode. Now that I know what values to patch, DS mode shouldn't be too far now, assuming I don't fall asleep before I succeed.

4205de0403.jpg

a7a62e196e.jpg
 

AkikoKumagara

The Coolest Bear Around
Member
Joined
Jan 4, 2017
Messages
1,533
Trophies
1
Website
thebearsden.web.fc2.com
XP
3,922
Country
United States
Love that you found that screen swap thing. Hope that gets added as an additional feature. I can't imagine it being useful in a ton of games, but it's still cool as hell. Good job on the GBA patch as well, looking forward to it.
 
  • Like
Reactions: Sono

DSoryu

GBA/NDS Maniac
Member
Joined
May 5, 2010
Messages
2,356
Trophies
2
Location
In my house
XP
4,757
Country
Mexico
Great to hear that your progress is giving results beyond your expectations, and by the compromises that need to be taken, only testing can give you the answers you seek, so take your time and sleep enough, believe me, mental fatigue is the worst in the world, so I highly recommend you to rest enough. Thank you for sharing your findings!

EDIT: I just saw that is possible to swap screens!! Now I love you more haha, that is really a GREAT thing for me, because in the Castlevania games I always found weird to have the map at the top screen instead the opposite, and on emulators I always tend to swap them.

Now a few questions regarding this:
Will it be "swapable" in-game and per game?
Will it need to be patched/unpatched before opening DS-mode, affecting every game?
I know it would be hard to implement these patches per game, but, is there a possibility to do that?
 
Last edited by DSoryu,

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
Love that you found that screen swap thing. Hope that gets added as an additional feature. I can't imagine it being useful in a ton of games, but it's still cool as hell.
This is definitely very nice. Over in the widescreen thread there's a collection of games which are in a separate list because they display primarily on the touch screen, so there's no benefit to widescreen. A feature like that could turn a lot of those around, as long as they don't rely heavily on touch input. e.g. The Zelda games would not work very well if you swapped the screens because they're based entirely around touch input (unless you use button hacks), but other games that don't use touch too heavily should be playable switched and with widescreen support.

EDIT: @Dartz150 It would be hard to implement on a per-game basis if you're just launching them via normal methods, but with something like TWiLight Menu++ it should be doable. TWLMenu is already set up to handle widescreen on a per-game basis by loading into a separate TwlBg, so it should be equally as possible to launch into a separate "screen-flipped" TwlBg for selected games.
 
Last edited by Vague Rant,

Stack3r

Shizuo Heiwajima
Member
Joined
Jan 24, 2014
Messages
980
Trophies
0
Age
31
Location
Ikebukuro
XP
1,472
Awesome work on the GBA screen size! Does it appear to slow down FPS at all? And also would you be able to add that to your current program so we can have wide GBA?
 
  • Like
Reactions: Sono

Searinox

"Dances" with Dragons
Member
Joined
Dec 16, 2007
Messages
2,073
Trophies
1
Age
36
Location
Bucharest
XP
2,199
Country
Romania
There's a bug in the original code whereby DS mode scalled to full 3DS screen occasionally ends up duplicating a strip of the image on the lower part of the screen(s). It's fixable by closing and reopening the console lid but I'm curious if with your insight you can actually tell what's going on and why this bug occurs.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr