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

  • Thread starter Sono
  • Start date
  • Views 745,630
  • 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,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
A question about the origin of this amazing hack: Do I understand correctly that the widescreen feature for DS games was already included in the stock firmware for 2DS/3DS by Nintendo, but hidden and not used for some reason, and Sono reverse engineered the code and made it live? That's fantastic...

Widescreen: no
1.5x stretching: yes

I had to completely reverse engineer the driver and do tests using my exe patcher to figure out how to stretch X and Y axes individually.
 

Cava

Well-Known Member
Member
Joined
Jan 26, 2016
Messages
741
Trophies
0
XP
1,347
Country
Hungary
Everyone has been waiting long enough. It's 31C at 21:58 and I'm having a heatstroke. Fuck this.

I packaged the secret PC version. No pattern selection, sorry. Not that it's useful because the widescreen patch writes an identity matrix on boot.

Put unpatched TwlBg.cxi or section0.bin next to mkpatch.exe and rename it as section0.bin
Run ./mkpatch.exe asd 1010
That will create TwlBg.cxi which you can copy to your 3DS

The exe is in a zip to bypass "security" checks.

the "asd" part can be anything except "agb"
"1010" is a binary bitmask, 0th bit is rightmost, zerofill
bit list:
0 CTR_Redshift
1 debug text
2 trainer mode
3 DMPGL wide
4 "HID" patch, source code says "remove opposing DPAD check"
7 "DEBUG" patch, source code says "hidden debug patch"

rest of the bits must be zero or else fail

Note for patch selection:
If "bytes used" reports 100% or more then remove either the debug text or the redshift code!

https://puu.sh/E43fN/f7f3eb2f61.zip

@Sono Thank you my fellow friend from our country. Just a quick question, is it just stretch the game screen or displaying with the right ratio?
 
  • Like
Reactions: Sono

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
@Sono Thank you my fellow friend from our country. Just a quick question, is it just stretch the game screen or displaying with the right ratio?

Sadly it's fake. I'm just stretching the already existing 256x192 image to 320x240 (or 384x240 for the widescreen patch), kinda like how you would in mspaint (stretch 125% on both sides).

As for the widescreen part, I've been told that the DS-side patches only patch the code so the 3D geometry gets squished, so when you stretch it out it'll look normal, and this is called anamorphic widescreen.

Bojler eladó!

...főleg ilyen faszom szar fos hőroham időben, kinek kell forró víz :/
 
D

Deleted User

Guest
Sadly it's fake. I'm just stretching the already existing 256x192 image to 320x240 (or 384x240 for the widescreen patch), kinda like how you would in mspaint (stretch 125% on both sides).

As for the widescreen part, I've been told that the DS-side patches only patch the code so the 3D geometry gets squished, so when you stretch it out it'll look normal, and this is called anamorphic widescreen.

Bojler eladó!

...főleg ilyen faszom szar fos hőroham időben :/
Can confirm. Currently the only squished bits in Pokemon Platinum are the 3d objects
 

Hyper99

Well-Known Member
Newcomer
Joined
Aug 2, 2019
Messages
90
Trophies
0
Age
21
XP
140
Country
Venezuela
If backlight doesn't even turn on then TwlBg.cxi is corrupted or invalid.

If backlight turns on then the patching failed. Is used bytes below 100% ?
Wait a minute. My 3DS is all weird. The apps I had on my SD card disappeared and TwilightMenu++ doesn't even start anymore.

--------------------- MERGED ---------------------------

Isn't that caused by the anti piracy protection in heart gold and soul silver ?
I don't think so. Before putting Widescreen.cxi on TwlBg folder, the game started just fine
 

Hyper99

Well-Known Member
Newcomer
Joined
Aug 2, 2019
Messages
90
Trophies
0
Age
21
XP
140
Country
Venezuela
@Sono @Robz8 Ok, this is really weird. I don't know if this is meant to be like this but it seems TwilightMenu++ deletes Widescreen.cxi and creates a TwlBg.cxi on the luma/sysmodules directory. After booting a game (after I close the app when the black screen appears), TwilightMenu++ doesn't boot after I open it again.
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,571
Trophies
3
Age
24
XP
20,947
Country
United States
@Sono @Robz8 Ok, this is really weird. I don't know if this is meant to be like this but it seems TwilightMenu++ deletes Widescreen.cxi and creates a TwlBg.cxi on the luma/sysmodules directory. After booting a game (after I close the app when the black screen appears), TwilightMenu++ doesn't boot after I open it again.
Did you manually install the latest TWLMenu++ CIAs?
 

pedroka26

Member
Newcomer
Joined
Dec 9, 2018
Messages
23
Trophies
0
Age
29
XP
758
Country
Brazil
Did you use 1010 mask? It sounds like you tried 1110 or 0110, hence the debug text stays on-screen. Is the game even running?
Yeah, yeah, its running good. I guess that my problem is that I dont know how to do that "mask" stuff. I just put the .cxi file in the same folder of the .exe, renamed it, and patched it.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,310
Country
Hungary
Yeah, yeah, its running good. I guess that my problem is that I dont know how to do that "mask" stuff. I just put the .cxi file in the same folder of the .exe, renamed it, and patched it.

If you run the exe directly then that's what you get. Don't do that.
 
D

Deleted User

Guest
Yeah, yeah, its running good. I guess that my problem is that I dont know how to do that "mask" stuff. I just put the .cxi file in the same folder of the .exe, renamed it, and patched it.
Place this file next to your "mkpatch_b.exe" and rename the file to just "wide.bat" opposed too "wide.bat.txt" and run the bat file by double-clicking it.

That should give you the proper file

Alternatively..if you want to make your own batch file..put this in it

Code:
mkpatch_b asd 1010
 

Attachments

  • wide.bat.txt
    18 bytes · Views: 629
  • Like
Reactions: pedroka26
D

Deleted User

Guest
Thanketh you for your work, papa Sono
Pokemon Platinum's overworld sprites look crunchy as hell in Widescreen, but 3D looks perfect :grog:
 
  • Like
Reactions: RocketRobz

Hyper99

Well-Known Member
Newcomer
Joined
Aug 2, 2019
Messages
90
Trophies
0
Age
21
XP
140
Country
Venezuela
Did you use 1010 mask? It sounds like you tried 1110 or 0110, hence the debug text stays on-screen. Is the game even running?
The game doesn't boot. And I believe I used 1010, but I asked a friend to patch it for me since I don't have a 64 bit OS. But I just told him to execute the wide.bat (which was correctly written) and send me the TwlBg.cxi
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/3eGAHfC5P-Y?si=Fo3iEl1pZ4D_O6dp