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

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

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,350
Country
Hungary
I included the "1.25x scale patch"

Can someone confirm it works as expected?

I really can't read your Python code, but I'll try to word the patching section differently, because it seems like my words are not understandable (probably due to the wording).


When you CTRL-F for the pattern, HxD selects the entire find. You have to click at the END of the selection, and then press CTRL-B to paste overwrite (CTRL-V will append data, which changes the file size, which is very wrong).

So basically, you have to overwrite the patch data AFTER the search pattern I provided.
 
Last edited by Sono, , Reason: fixed typo

kane159

Well-Known Member
Member
Joined
May 28, 2013
Messages
215
Trophies
1
Age
35
XP
1,244
Country
Taiwan
I included the "1.25x scale patch"

Can someone confirm it works as expected?

By the way I recommand to use decrypt9 and not godmode9 to dump the twl_firm

i got cp: cannot stat 'firm/firm_3_08006000.bin': No such file or directory what am i doing wrong?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,350
Country
Hungary
ok, im just trying the script now im trying to do it Manual, if i want the upscaling i do Manual 1.25x scale patch step right?

I guess you don't want the image to stretch outside of the screen with weird touch, so yeah, do the 1.25x patch for a sharper image.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,350
Country
Hungary
Since the 3DS is 400x240 and the DS is 256x192, is it possible to patch TWL_FIRM to increase the internal resolution of DS games?

It's not possible to modify the DS GPU, so sadly it's not possible to force a higher resolution. Besides, it would break some games which heavily rely on hardware quirks.

Also, the bottom screen is 240x320 (yes, because they are actually rotated).
 

dubbz82

Well-Known Member
Member
Joined
Feb 2, 2014
Messages
1,572
Trophies
0
Age
41
XP
1,215
Country
United States
Here's a dumb question, could a 1x "filter" be applied to basically force the native resolution mode to be applied without holding down the button? I personally wouldn't make use of this, but I know several other people have asked about this in the past in bootstrap's discord.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,350
Country
Hungary
I wanted to release the patcher already, but I broke the repacker code, and I'm too tired to figure it out, so y'all have to wait until I wake up. Sorry for the inconvenience :(

Here's a dumb question, could a 1x "filter" be applied to basically force the native resolution mode to be applied without holding down the button? I personally wouldn't make use of this, but I know several other people have asked about this in the past in bootstrap's discord.

And several people have also asked it here. Yes, the START+SELECT combo can be inverted, and it can be done by patching only a few bytes of code, so it'll be definitely present in the patcher. So far there are only a few 1.25x presets, but I always forget to include this one :wacko:
 

Wryyyong

Well-Known Member
Newcomer
Joined
Jan 12, 2017
Messages
59
Trophies
0
Age
23
Location
Perth, Western Australia
XP
2,086
Country
Australia
I appreciate the effort, OP, but your guide is kind of a mess...

So I tried making a script to automize the extracting and rebuilding process as much as possible.

Script: https://mega.nz/#!1mYgHYRL!7YZZy_MabrmLq2hZw4IP2GKFshuk8jfMe1hUPfh3lLM
Filename: Run.bat
MD5: a064ebbb78cf22fc327b5dbb660a6e89

If you're (understandably) wary of running random scripts off of a tech forum, you're more than free to open the script in a text editor and judge its legitimacy for yourself. I've tried making using it as foolproof as possible.


Prerequisites (you will need the following):

  • Access to GodMode9
  • A PC and a way of moving files between it and the SD card (eg. directly or via FTP)
  • A hex-editor for PC (HxD is a good one), and basic knowledge on how to use the program
  • FirmTool (must be installed via Python)
  • 3DSTool (must either be in script directory or system PATH)
  1. Boot into GodMode9 on your system.
  2. Once loaded, go through [SYSNAND CTRNAND > title > 00040138 > *0000102 > content > ********.app] and mount the .app file.
    • The "*" is a wildcard, it can fit any alphanumerical sign.
    • Select the .app file with the highest number.
  3. Once you're inside the mounted .app, enter the [exefs] folder, select the .firm file there, and copy it to [0:/gm9/out].
  4. Turn off your system, remove the SD card from it and connect it to your PC (or use FTP to wirelessly transfer files, it's up to you).
  5. Travel to [SD:\gm9\out\] on your PC, and copy the .firm file somewhere onto your PC (preferably in own folder).
  6. Move the 'Run.bat' script (download at the top of my post) into the same directory as the .firm.
  7. Rename the .firm file to "TWL.firm" and run the script.
    • If you encounter this message while trying to run the script, please make sure you have both FirmTool and 3DSTool installed and findable by the script.
    • rqfb2Pd.png
  8. Please read the script output, follow it carefully, and press the Y key to continue after doing so:
    • W2XzEdu.png
  9. Wait until you get this wall of text:
    • XJI9VFt.png
  10. Open the code.bin that appeared in the script directory in your hex-editor, apply and save the patches of your choice (as stated above), and press the number key stated to continue with the script.
  11. Wait until you receive this message:
    • l2nEY8D.png
  12. Check your script's directory. There should now be a "TwlBg.cxi" inside it. Copy TwiBg.cxi onto your SD (again, either directly or via FTP) under [SD:\luma\sysmodules\].
  13. Reinsert the SD card into the system (or reboot it if you used FTP) and power it on while holding SELECT to enter Luma's configuration menu.
  14. Ensure that these two options are ticked:
    • "Enable game patching"
    • "Enable loading external FIRMs and modules"
  15. Press START to save your settings.
And that should be it.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    I'll reformat and have a 3tb raid0 m. 2 at least
    +1
  • K3Nv2 @ K3Nv2:
    Lmao that sold out fast
    +1
  • Veho @ Veho:
    Yeet the cat.
    +1
  • K3Nv2 @ K3Nv2:
    Good idea
    +1
  • The Real Jdbye @ The Real Jdbye:
    i thought everybody knew cocktails are like 75% ice
  • Veho @ Veho:
    Yeah but not like this.
  • Veho @ Veho:
    It's not like they're complaining that their Slurpee is 99% ice or something, but if the cocktail calls for "shot of vodka, shot of vermouth, shot of gin, shot of Campari, three shots of juice, squirt of lemon" and ends up being a thimbleful of booze, that's a problem.
  • The Real Jdbye @ The Real Jdbye:
    the funny thing is cocktails in norway are only allowed to have 1 20ml shot of booze
  • The Real Jdbye @ The Real Jdbye:
    so..... yeah
  • The Real Jdbye @ The Real Jdbye:
    we're used to only having a thimbleful of booze
  • Veho @ Veho:
    Booo.
  • The Real Jdbye @ The Real Jdbye:
    same thing if you want whisky on the rocks or something, you can't get a double
  • The Real Jdbye @ The Real Jdbye:
    but you could buy as many shots of whisky (or anything else) as you want and ask for a glass of ice and pour them in
  • The Real Jdbye @ The Real Jdbye:
    it's dumb
  • Veho @ Veho:
    Maybe.
  • Veho @ Veho:
    There was a comparison of the number of Ibuprofen poisonings before and after they limited the maximum dosage per box or per pill (i'll look that up). No limit on the number of boxes you can still buy as many as you want, so people argued it was pointless.
  • Veho @ Veho:
    But the number of (accidental) poisonings dropped because drinking an entire package of ibuprofen pills went from "I need a new liver" to "I need a new box of Ibuprofen".
  • Veho @ Veho:
    Here we have ketoprofen that used to be prescription-only because of the risk of toxic dosages, but then they halved the dose per pill and sell them in bottles of six pills apiece instead of twenty and it doesn't need a prescription any more. Yes you can buy more than one bottle but people simply don't.
  • Psionic Roshambo @ Psionic Roshambo:
    Usually accidentally overdose of ibuprofen here is from people taking like cold medicine then ibuprofen for a headache and the combination is over what they need
    Veho @ Veho: https://imgur.com/gallery/QQkYnQu