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

  • Thread starter Sono
  • Start date
  • Views 621,485
  • Replies 2,276
  • Likes 96

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

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

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

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

    Votes: 11 5.4%
  • No, because I only use DS and DSi mode

    Votes: 15 7.3%

  • Total voters
    205

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
734
Trophies
0
Age
32
XP
1,223
Country
Argentina
Meanwhile, I'm still waiting for a patch that automatically shows my GBA and DSiWare games in pixel-perfect mode without having to hold Start or Select. Every. Single. Time. That I boot them up. It was proposed as an option in Luma, but was rejected in favor of more TWLBg research. Now that such research is done, can I please have this option somehow?
by pixel perfect you mean that it's completely unfiltered and unstretched? wouldn't it look TINY?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
is it already possible to apply filters in GBA mode?

Yeah, but I keep forgetting to re-add the filters which got lost from the source code at some time.

As I got ninja'd above at the time of typing this reply, you do need to indeed hold Y during the Nintendo 3DS boot logo after launching TWPatch until the menu shows up to boot into the hidden GBA patcher mode.
 
  • Like
Reactions: zarke661

BETA215

Member?
Member
Joined
Dec 30, 2014
Messages
313
Trophies
0
Location
they/them | 0xDEAD brain
XP
1,342
Country
Argentina
Yeah, but I keep forgetting to re-add the filters which got lost from the source code at some time.

As I got ninja'd above at the time of typing this reply, you do need to indeed hold Y during the Nintendo 3DS boot logo after launching TWPatch until the menu shows up to boot into the hidden GBA patcher mode.
Ninjas are good, or so I've been told! *sweats from fear*
 
  • Like
Reactions: Sono

zarke661

Active Member
Newcomer
Joined
Sep 10, 2021
Messages
25
Trophies
0
Age
27
XP
415
Country
Brazil
Yeah, but I keep forgetting to re-add the filters which got lost from the source code at some time.

As I got ninja'd above at the time of typing this reply, you do need to indeed hold Y during the Nintendo 3DS boot logo after launching TWPatch until the menu shows up to boot into the hidden GBA patcher mode.
will we have new filters? this will be very interesting.
 

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
37
XP
132
Country
Belgium
I've tried to install this based on the installation instructions found on GameBrew, which are written for enabling widescreen.

Specifically:
-Placed TWPatch.3dsx in 3ds folder.
-Launched TWPatch using the homebrew launcher.
-Pressed Y+B to open the patch menu.
-Toggled "Invert START+SELECT function".
-Pressed B.
-Held START to begin patching.

I saw that the D-pad patch was also applied, despite not selecting it.

At this point, the instructions are unclear, so I first tried launching a GBA game. The screen was still stretched.

Rebooted my 3DS into Luma3DS's configuration screen. Enabled external FIRMs and modules, and saved. Tried a GBA game again. No change.

What do I have to do at this point?

Also, since you were able to patch the D-pad, does that mean it is possible to remap the GBA's buttons?
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,259
Trophies
1
Age
21
Location
米国
Website
pk11.us
XP
3,595
Country
United States
I've tried to install this based on the installation instructions found on GameBrew, which are written for enabling widescreen.

Specifically:
-Placed TWPatch.3dsx in 3ds folder.
-Launched TWPatch using the homebrew launcher.
-Pressed Y+B to open the patch menu.
-Toggled "Invert START+SELECT function".
-Pressed B.
-Held START to begin patching.

I saw that the D-pad patch was also applied, despite not selecting it.

At this point, the instructions are unclear, so I first tried launching a GBA game. The screen was still stretched.

Rebooted my 3DS into Luma3DS's configuration screen. Enabled external FIRMs and modules, and saved. Tried a GBA game again. No change.

What do I have to do at this point?

Also, since you were able to patch the D-pad, does that mean it is possible to remap the GBA's buttons?
Make sure that you're running Luma from SD, not NAND. If you have a boot.firm file on your SD card you're good. If not download it either from Universal-Updater or just manually.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
I've tried to install this based on the installation instructions found on GameBrew, which are written for enabling widescreen.

Specifically:
-Placed TWPatch.3dsx in 3ds folder.
-Launched TWPatch using the homebrew launcher.
-Pressed Y+B to open the patch menu.
-Toggled "Invert START+SELECT function".
-Pressed B.
-Held START to begin patching.

I saw that the D-pad patch was also applied, despite not selecting it.

At this point, the instructions are unclear, so I first tried launching a GBA game. The screen was still stretched.

Rebooted my 3DS into Luma3DS's configuration screen. Enabled external FIRMs and modules, and saved. Tried a GBA game again. No change.

What do I have to do at this point?

Also, since you were able to patch the D-pad, does that mean it is possible to remap the GBA's buttons?

What are you exactly trying to do? Trying to use native GBA mode, or running GBARunner2 in DS mode?

For GBA mode, you need to hold Y while booting TWPatch to enable GBA patching mode (you know when you have enabled GBA patching mode if the number of scale filters drops dramatically, and the background is glitched out).

The DPAD patch doesn't affect normal gameplay on unmodified hardware. It lets you use both CPad+DPAD to let you press "illegal" combinations UP+DOWN and LEFT+RIGHT.

While the DPAD patch doesn't do anything fancy which would infer that button remapping is possible, it is possible to "remap" the buttons (or more accurately, simulate button input in software). Normally the button presses are routed directly to the GBA, so there is zero delay there. But with button remapping, since it has to be simulated in software, so there is some added delay which might be noticable by some players.
I can not do a patch to do this in Nintendo's own garbage code due to many reasons, but if writing new code then it is doable.
 

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
37
XP
132
Country
Belgium
What are you exactly trying to do? Trying to use native GBA mode, or running GBARunner2 in DS mode?

For GBA mode, you need to hold Y while booting TWPatch to enable GBA patching mode (you know when you have enabled GBA patching mode if the number of scale filters drops dramatically, and the background is glitched out).

The DPAD patch doesn't affect normal gameplay on unmodified hardware. It lets you use both CPad+DPAD to let you press "illegal" combinations UP+DOWN and LEFT+RIGHT.

While the DPAD patch doesn't do anything fancy which would infer that button remapping is possible, it is possible to "remap" the buttons (or more accurately, simulate button input in software). Normally the button presses are routed directly to the GBA, so there is zero delay there. But with button remapping, since it has to be simulated in software, so there is some added delay which might be noticable by some players.
I can not do a patch to do this in Nintendo's own garbage code due to many reasons, but if writing new code then it is doable.
I'm trying to use native GBA mode. Just followed your instructions, and now it works! Thanks!

I know the D-pad patch doesn't affect normal gameplay, but I prefer to not have a patch applied that I didn't choose.

Is the routing really that direct? Surely there must be code somewhere that tells AGB_FIRM which 3DS buttons correspond to which GBA buttons? Because all four face buttons are mapped to either A or B.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
I'm trying to use native GBA mode. Just followed your instructions, and now it works! Thanks!

I know the D-pad patch doesn't affect normal gameplay, but I prefer to not have a patch applied that I didn't choose.

Is the routing really that direct? Surely there must be code somewhere that tells AGB_FIRM which 3DS buttons correspond to which GBA buttons? Because all four face buttons are mapped to either A or B.

I'm sorry that you feel about the DPAD patch that way. Although it requires conscious effort to press both the DPAD + CPad together which you probably never need to do under normal circumstances, and most games already have a mechanism to still counteract LEFT+RIGHT or UP+DOWN press (which is usually MUCH better anyway than what garbage Nintendo did), so I thought that this default could only be beneficial to basically almost everyone. Besides, the default DPAD filtering just adds delay to the inputs, and that's also a reason I have disabled the filtering by default.
Although to be fair, I didn't expect people to go into the patcher that often, so using original design considerations, I thought it's okay to have some defaults, and let people uncheck them if they *really* hate it. The only exception to this is rtcom in DS mode, which is required by some patches to work properly, so it's easier (for me) to just leave it enabled than to have people complaining that after patching they just go to a black screen because they forgot to enable it.

I would love to hear feedback though, especially since many people use TWPatch more often than I have intended it to be used. Because I don't get much feedback, it's hard to know if I'm doing things good or bad.

Yes, if you disable software control for every button then each physical button (DPAD, A, B, START, SELECT, L, R) gets connected directly to the GBA (also X and Y in DS mode), so if the game scans the buttons more than 60FPS, or has an interrupt set up for button presses, you can trigger them anywhere mid-frame.
However, if you enable software control, the software itself controls when the buttons get scanned from the 3DS side, processed, then forwarded into the DS/GBA side. Nintendo's code does this AFTER VSync, so every software button will be at least one frame too late.
As for the X button functioning as B in GBA mode, that's done in software, so it will be subject to the 1 frame delay.
 
  • Like
Reactions: zarke661

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
37
XP
132
Country
Belgium
Besides, the default DPAD filtering just adds delay to the inputs, and that's also a reason I have disabled the filtering by default.
That's a reason I can get behind. :)
Although to be fair, I didn't expect people to go into the patcher that often, so using original design considerations, I thought it's okay to have some defaults, and let people uncheck them if they *really* hate it.
I understand, but that patch wasn't checked in the list, yet it was still installed. That's what bugged me.
Yes, if you disable software control for every button then each physical button (DPAD, A, B, START, SELECT, L, R) gets connected directly to the GBA (also X and Y in DS mode), so if the game scans the buttons more than 60FPS, or has an interrupt set up for button presses, you can trigger them anywhere mid-frame.
However, if you enable software control, the software itself controls when the buttons get scanned from the 3DS side, processed, then forwarded into the DS/GBA side. Nintendo's code does this AFTER VSync, so every software button will be at least one frame too late.
As for the X button functioning as B in GBA mode, that's done in software, so it will be subject to the 1 frame delay.
I see, so the buttons are connected by hardware after all. Too bad.
 

zarke661

Active Member
Newcomer
Joined
Sep 10, 2021
Messages
25
Trophies
0
Age
27
XP
415
Country
Brazil
A97AE2F9-F213-42DD-9AD6-225B63FFDA68.jpeg
is it not possible to get this scale in AGB mode? it is much sharper
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,654
Trophies
2
Location
rehabilitation center
XP
8,219
Country
Hungary
That's a reason I can get behind. :)

I understand, but that patch wasn't checked in the list, yet it was still installed. That's what bugged me.

I see, so the buttons are connected by hardware after all. Too bad.

Which patch was not checked yet still applied? That could be a bug.

"Too bad"? What's wrong with direct connection? There is some latency in the video output due to the capture card, but that's it, the rest works like an actual GBA.
Also all buttons can be overridden in software, which would allow for things like button remapping, TAS input, macros (turbo fire button?), and other things.

View attachment 330198 is it not possible to get this scale in AGB mode? it is much sharper

How did you apply this, and what do you mean? I need more information so I could investigate this.
 

zarke661

Active Member
Newcomer
Joined
Sep 10, 2021
Messages
25
Trophies
0
Age
27
XP
415
Country
Brazil
How did you apply this, and what do you mean? I need more information so I could investigate this.

megaman zero collection: re-released gba games for nintendo ds. the filter used is sono crisp. The screen is a little smaller but is much sharper.
 

Attachments

  • C9A61F5E-988B-431D-945C-315A04D010D9.jpeg
    C9A61F5E-988B-431D-945C-315A04D010D9.jpeg
    5.5 MB · Views: 51

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
37
XP
132
Country
Belgium
Which patch was not checked yet still applied? That could be a bug.
The D-pad filter one.
"Too bad"? What's wrong with direct connection?
In this case, it means that the buttons can't be remapped without introducing latency.
There is some latency in the video output due to the capture card
How much latency are we talking about?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
  • Psionic Roshambo @ Psionic Roshambo:
    Do the Mario lol
  • K3N1 @ K3N1:
    🍑
  • K3N1 @ K3N1:
    Whoever developed Bramble was smoking that good shit fucking gnomes
    K3N1 @ K3N1: Whoever developed Bramble was smoking that good shit fucking gnomes