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

  • Thread starter Sono
  • Start date
  • Views 734,228
  • Replies 2,420
  • Likes 100

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 .

placebo_yue

Well-Known Member
Member
Joined
Aug 7, 2019
Messages
739
Trophies
0
Age
33
XP
1,263
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,800
Trophies
2
Location
home
XP
9,221
Country
Hungary
by pixel perfect you mean that it's completely unfiltered and unstretched? wouldn't it look TINY?

It WILL be tiny. There is simply no other way, the display lacks enough pixels, and there isn't enough raw hardware power for subpixel magic filters to work in real time at 60FPS.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,800
Trophies
2
Location
home
XP
9,221
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 not found
Member
Joined
Dec 30, 2014
Messages
332
Trophies
0
Location
they/them | 0xDEAD brain
XP
1,650
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
29
Trophies
0
Age
28
XP
559
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
38
XP
142
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,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,878
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,800
Trophies
2
Location
home
XP
9,221
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
38
XP
142
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,800
Trophies
2
Location
home
XP
9,221
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
38
XP
142
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
29
Trophies
0
Age
28
XP
559
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,800
Trophies
2
Location
home
XP
9,221
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
29
Trophies
0
Age
28
XP
559
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: 78

BenoitRen

Active Member
Newcomer
Joined
Jul 1, 2015
Messages
40
Trophies
0
Age
38
XP
142
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?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • ZeroT21 @ ZeroT21:
    it wasn't a question, it was fact
  • BigOnYa @ BigOnYa:
    He said he had 3 different doctors apt this week, so he prob there. Something about gerbal extraction, I don't know.
    +1
  • ZeroT21 @ ZeroT21:
    bored, guess i'll spread more democracy
  • LeoTCK @ LeoTCK:
    @K3Nv2 one more time you say such bs to @BakerMan and I'll smack you across the whole planet
  • K3Nv2 @ K3Nv2:
    Make sure you smack my booty daddy
    +1
  • LeoTCK @ LeoTCK:
    telling him that my partner is luke...does he look like someone with such big ne
    eds?
  • LeoTCK @ LeoTCK:
    do you really think I could stand living with someone like luke?
  • LeoTCK @ LeoTCK:
    I suppose luke has "special needs" but he's not my partner, did you just say that to piss me off again?
  • LeoTCK @ LeoTCK:
    besides I had bigger worries today
  • LeoTCK @ LeoTCK:
    but what do you know about that, you won't believe me anyways
  • K3Nv2 @ K3Nv2:
    @BigOnYa can answer that
  • BigOnYa @ BigOnYa:
    BigOnYa already left the chat
  • K3Nv2 @ K3Nv2:
    Biginya
  • BigOnYa @ BigOnYa:
    Auto correct got me, I'm on my tablet, i need to turn that shit off
  • K3Nv2 @ K3Nv2:
    With other tabs open you perv
  • BigOnYa @ BigOnYa:
    I'm actually in my shed, bout to cut 2-3 acres of grass, my back yard.
  • K3Nv2 @ K3Nv2:
    I use to have a guy for that thanks richard
  • BigOnYa @ BigOnYa:
    I use my tablet to stream to a bluetooth speaker when in shed. iHeartRadio, FlyNation
  • K3Nv2 @ K3Nv2:
    While the victims are being buried
  • K3Nv2 @ K3Nv2:
    Grave shovel
  • BigOnYa @ BigOnYa:
    Nuh those goto the edge of the property (maybe just on the other side of)
  • K3Nv2 @ K3Nv2:
    On the neighbors side
    +1
  • BigOnYa @ BigOnYa:
    Yup, by the weird smelly green bushy looking plants.
    K3Nv2 @ K3Nv2: https://www.the-sun.com/news/10907833/self-checkout-complaints-new-target-dollar-general-policies...