Hacking Widescreen cheats for DS games on 3DS

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,289
Country
Hungary
GBARunner2 also recently added native screen-swapping, so there's no pressing need for it on the TwlBg side any more.

If I remember correctly, unless the image is intact in the top-left corner then there is one frame delay for the image to be displayed. I just vaguely remember this, so I might be completely wrong.

However, swapping the screens just changes the memory location at where the DS framebuffer is stored 3DS-side, so it has zero latency, because I'm just changing where the image is stored in VRAM. It's completely passive, one-time swap. And it can also be done at will without any side-effects (tried it, and it only causes epillepsy, it doesn't crash TwlBg).
 

AlterL

Active Member
Newcomer
Joined
Aug 12, 2019
Messages
40
Trophies
0
Age
27
XP
144
Country
Venezuela
Only DS mode is supported (including GBArunner2), because on GBA VC there is only one screen (the bottom screen is not part of the display), so the patch crashes.


The only problem with the screen swap patch is that it only works on a very specific version because I can't use pattern matching to find a pointer I need to swap the screen framebuffer pointers.

The above in ELI5 terms: I can't automate screen swapping, so it can only work on a specific version where it's tested working.


Also yes, homebrew can work if they can squish the 3D to fit more stuff, so it can be stretched out later.


thanks for the info. If it's not to much trouble, would you mind trying it with the DSVanias? I know the image will look stretched because they're 2d games when it changes to the topscreen, but I would really love to play it anyways. Also just wanted to say. thank you, been wanting to play Manhunt2 like this for years and you made it possible.
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,289
Country
Hungary
thanks for the info. If it's not to much trouble, would you mind trying it with the DSVanias? I know the image will look stretched because they're 2d games when it changes to the topscreen, but I would really love to play it anyways. Also just wanted to say. thank you, been wanting to play Manhunt2 like this for years and you made it possible.

Well, it's important to note that screen swap AND widescreen is not possible yet, because it's a LOT of hard work. Patching DMPGL (3DS' OpenGL driver) is really difficult due to compiler optimizations, and just generally lack of patch space. I have to get really creative with the patches.
 

AlterL

Active Member
Newcomer
Joined
Aug 12, 2019
Messages
40
Trophies
0
Age
27
XP
144
Country
Venezuela
Well, it's important to note that screen swap AND widescreen is not possible yet, because it's a LOT of hard work. Patching DMPGL (3DS' OpenGL driver) is really difficult due to compiler optimizations, and just generally lack of patch space. I have to get really creative with the patches.

understood. I still would love to see it done (the topscreen change) If only for the it factor. Better to have it and not need it than to need it and not have it.
 

robyspy

Well-Known Member
Member
Joined
Sep 18, 2018
Messages
179
Trophies
0
XP
943
Country
Italy
A friend has some problems with this game (Over the Hedge), he says that once a mission is over he is shown a green screen that says this: "impossible to write data, turn off the console, remove the DS card and reissue it" and has no way to continue with the game.
He says the first start of the game was regular, like other roms of this same game, but each of these roms always gives the same problem described above.
Other games work perfectly.
It has the TWLM++ updated (9.3) and starts in DS mode.
Any solution to help him?
 

DSoryu

GBA/NDS Maniac
Member
Joined
May 5, 2010
Messages
2,355
Trophies
2
Location
In my house
XP
4,751
Country
Mexico
A friend has some problems with this game (Over the Hedge), he says that once a mission is over he is shown a green screen that says this: "impossible to write data, turn off the console, remove the DS card and reissue it" and has no way to continue with the game.
He says the first start of the game was regular, like other roms of this same game, but each of these roms always gives the same problem described above.
Other games work perfectly.
It has the TWLM++ updated (9.3) and starts in DS mode.
Any solution to help him?

This thread is to discuss widescreen cheats related stuff only. For your issue, you should ask in TM++ thread here:
https://gbatemp.net/threads/ds-i-3d...-ds-i-games-and-ds-i-menu-replacement.472200/
 

robyspy

Well-Known Member
Member
Joined
Sep 18, 2018
Messages
179
Trophies
0
XP
943
Country
Italy
Yes I'm sorry, you're right, but I saw the opportunity to dive into this problem. I thought that if this game works in widescreen it could help me and that therefore the friend's problem is not because there is no AP patch file, but for some other obscure reason
 
Last edited by robyspy,

DSoryu

GBA/NDS Maniac
Member
Joined
May 5, 2010
Messages
2,355
Trophies
2
Location
In my house
XP
4,751
Country
Mexico
Yes, you're sorry, but I saw the opportunity to dive into this problem. I thought that if this game works in widescreen it could help me and that therefore the friend's problem is not because there is no AP patch file, but for some other obscure reason.

AFAIK WS cheats have nothing to do with save issues.

The frontend (TWM++ in this case) is the one in charge of creating the save file with a correct size, and nds-bootstrap in charge of rewriting/reading save data properly. If there are issues with saves, then both the frontend and nds-boostrap could be involved.
 
Last edited by DSoryu,

gamemasterplc

Active Member
Newcomer
Joined
Sep 6, 2019
Messages
25
Trophies
0
Age
22
XP
339
Country
United States
Metroid Prime Hunters (USA)

16:10 Widescreen for 3DS
52110FFC E5991664
02110FFC E3A0109F
D2000000 00000000
5211C638 E59A1664
0211C638 E3A0109F
D2000000 00000000
52110820 00001555
02110820 00001999
D2000000 00000000

This game required three ASM patches for proper widescreen. The first one does the main widescreen. The second one patches the 3D to 2D positioning scale. The third one patches the culling plane widths.
 

gamemasterplc

Active Member
Newcomer
Joined
Sep 6, 2019
Messages
25
Trophies
0
Age
22
XP
339
Country
United States
Mario and Sonic at the Olympic Games

16:10 Widescreen for 3DS
52029E20 E59F10F0
02029E04 EA0136A6
D2000000 00000000
520778A0 73656C6B
020778A4 E3A02301
020778A8 E5922304
020778AC E2122902
020778B0 1A000001
020778B4 E3A04D66
020778B8 E2844021
020778BC E5864008
020778C0 EAFEC950
D2000000 00000000

This game required a small hook to patch the aspect ratio only when the top-screen is rendering 3D. There is another stretch value for some 2D elements at 0x20703E0 but that causes more graphical glitches than improvements when set properly for 16:10 causing fucked up alignment in several places and some squished bottom screen 2D elements.
 

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,299
Country
Wow @gamemasterplc, great to have somebody of your talent contributing codes, thanks!

Amazing to see Metroid Prime: Hunters done right--my earlier code was garbage. :D And Mario & Sonic looks incredible, widescreen and dual-screen, great stuff!

EDIT: I hope you don't mind, in the process of porting your codes to all the other regions, I abbreviated your Mario & Sonic code using the Action Replay E codetype. This allows writing out larger patches without specifying the address for each instruction, so every replaced instruction only takes four bytes instead of eight.

Original CodeShrunken code
Code:
52029E20 E59F10F0
02029E04 EA0136A6
D2000000 00000000
520778A0 73656C6B
020778A4 E3A02301
020778A8 E5922304
020778AC E2122902
020778B0 1A000001
020778B4 E3A04D66
020778B8 E2844021
020778BC E5864008
020778C0 EAFEC950
D2000000 00000000
Code:
52029E20 E59F10F0
02029E04 EA0136A6
D2000000 00000000
520778A0 73656C6B
E20778A4 00000020
E3A02301 E5922304
E2122902 1A000001
E3A04D66 E2844021
E5864008 EAFEC950
D2000000 00000000
 
Last edited by Vague Rant,
  • Like
Reactions: RocketRobz

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,299
Country
I don't know if it too much to ask, but a code for Final Fantasy 4 Heroes of Light would be really neat
I actually made one for this game a couple of weeks ago but didn't post it because it seemed relatively unsatisfying (overworld gameplay is all on the touch screen but battles are on the top screen). If you don't mind that most of the game won't actually be in widescreen I'll give it another look.
I've reached a point where I've started hacking games that run on the touch screen to swap them up to the top screen (Blue Dragon: Awakened Shadow, Golden Sun: Dark Dawn, Steal Princess), so I actually came back to 4 Heroes again to see what else could be done for it.

Final Fantasy - The 4 Heroes of Light (USA)__15414-topwide.png

So now there's this. The code is very much untested, and currently only available for the USA version (at least until that one has been tested more than me running around the first town/overworld/cave), but anyone who wants to try it can find it in the first post, or for TWLMenu++ users, download the hack file attached to this post and put it in sdmc:/_nds/TWiLightMenu/widescreen. Don't forget to back up the original one in case this one works exactly as well as can be expected for a code I tested for about 5 minutes.

EDIT: As expected, this code doesn't work great currently; talking to any of the shopkeeper, inventory manager, wireless multiplayer assistant thing, etc. will flip the screens back. I'll fix this tomorrow.

EDIT 2: Code has been updated in the OP, tested up to the end of the first dungeon and ported to Europe/Japan. The version attached to this post is currently still the older broken one, give me a bit and I'll do a thing.

EDIT 3: The old broken code attached to this post has been deleted; you can find the current, working version attached to the OP.
 
Last edited by Vague Rant,

gamemasterplc

Active Member
Newcomer
Joined
Sep 6, 2019
Messages
25
Trophies
0
Age
22
XP
339
Country
United States
Ducati Moto

16:10 Widescreen for 3DS
52010384 04000304
02010368 E1A00000
D2000000 00000000
92001C30 00001555
12001C30 00001999
D2000000 00000000

Flips screens in menus to prevent some problematic menus. Menus will be a bit weird as you can still touch them but have an option for button control. Trying to hook the aspect ratio is impossible as it only sets the hardware projection matrix once for the entire game.
 
Last edited by gamemasterplc,
  • Like
Reactions: Vague Rant

Vague Rant

Deceptively cute
OP
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,299
Country
@Pokem Assuming you mean widescreen, then yes, you can add any or all of the widescreen codes to your personal usrcheat.dat or similar file for your flash card and enable them like any other cheats. You will also need to patch your TwlBg using Sono's patcher to get the widescreen scaling effect.
 
  • Like
Reactions: Pokem

Pokem

Well-Known Member
Member
Joined
Jul 22, 2016
Messages
1,058
Trophies
0
XP
1,434
Country
United States
@Pokem Assuming you mean widescreen, then yes, you can add any or all of the widescreen codes to your personal usrcheat.dat or similar file for your flash card and enable them like any other cheats. You will also need to patch your TwlBg using Sono's patcher to get the widescreen scaling effect.
TwlBg?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: :rofl2: