Tutorial  Updated

How to play NDS Games in HD Widescreen (16:9, 21:9, 32:9)!

c8Cp7XCK_o.png

~ Pokémon Diamond Version in 3840x1080 HD (32:9 1080p) with 3D Rasterized in x16 Native Resolution (Captured from Retroarch DeSmuME core)

Notes

  1. If you made a cheat code using the old formula (the one @PRAGMA made) then please update your code to the new formula below which is way more accurate and fixes im-proportionate pixels.
  2. Make sure both the Cheat Code and Emulator Window aspect ratio's match or the frames may look stretched.
Supported Systems

  • DeSmuME on Windows using DeSmuMAR, or DeSmuME on any PC OS however you will need to manually configure DeSmuME to allow window stretching and manually stretch the window to be the Aspect Ratio you wish for.
  • Any core on Retroarch as you can force a specific aspect ratio in Retroarch settings.
  • DrasticDS on Mobile as it allows you to stretch the emulator display.
  • Probably others too! Perhaps MelonDS?
General steps for non-specific systems

  1. Stretch the emulator's output to be the wanted Aspect Ratio. Either by code, settings, wrapper applications, or manually.
  2. Add a cheat code (which can be found below) for the games and Aspect Ratio you wish to use.
  3. Done, run the game, as long as the cheat code works, and the emulator's output is the correct Aspect Ratio, it should look great!
Tutorial for DeSmuME on Windows using DeSmuMAR

  1. Download DeSmuMAR, copy it to C:/Program Files/DeSmuME (Create folder if needed).
    For Windows 8.1 and older: Right-click DeSmuMAR.exe -> Properties -> Compatibility Tab -> Tick "Run this program as an Administrator" checkbox -> Save.
  2. Open DeSmuMAR and it will ask you if you want to download the latest official master branch Dev Build (Auto-build from from an official AppVeyor link).
    Say (y) to download it or (n) for instructions on manually downloading DeSmuME for DeSmuMAR integration.
  3. Right-click DeSmuME.exe -> Properties -> Compatibility Tab -> Tick "Run this program as an Administrator" checkbox -> Save.
    If DeSmuME doesn't get write permission while being inside the "C:/Program Files" directory then it cant save! By doing the above with the Properties, DeSmuME will always require Administrator permission to run, which prevents the problem of saving and such not working without your realizing. Regardless if you're using DeSmuMAR or not, I recommend doing this!
  4. Open DeSmuMAR.exe and enter in the Aspect Ratio and Resolution (Size) you wish to use. It will then open DeSmuME with the exact size you asked for! It will also change various DeSmuME settings to ensure it's able to be opened to the Aspect Ratio and Resolution you specified. All this, automatically! The next time you open DeSmuMAR it will automatically apply the same Aspect Ratio and Resolution, this can be changed by deleting "DeSmuMAR.ini" and re-opening.
  5. Read on below for instructions on getting an Action Replay Cheat Code to use, a cheat code is required or the game will look stretched. When adding a Cheat Code, make sure you tick "turn on code" and if the ROM already booted, reset the ROM to apply the cheat code.
Done! Now, always open DeSmuMAR.exe instead of DeSmuME.exe from now on. You can even associate it as the default application for .nds ROMs or drag and drop supported files onto DeSmuMAR.exe and it will work!

NOTE:
  • View -> LCDs Layout -> Only Horizontal and One LCD options are supported at the moment.
  • If you want a better viewing enjoyment, then I recommend you fiddling with Config -> 3D Settings -> "General Options" Area -> "GPU Scaling Factor". This option changes the resolution of 3D objects, essentially the bigger the scaling factor, the less pixelated 3D objects will be.
  • For Pixel-based games like Zelda, Pokémon, I don't recommend using Texture Scaling as it just makes them less crisp by scaling and using a blur kernel, it doesn't really make them look better at all, if not worse.
Example 16:9 Action Replay Cheat Codes for a handful of popular games


520775D0 00001555
020775D0 00001C72
D2000000 00000000
by @KazoWAR
5201E9E4 00001555
0201E9E4 00001C72
D2000000 00000000
by ?
5202022C 00001555
0202022C 00001C72
D2000000 00000000
by ?
52022F80 00001555
02022F80 00001C72
D2000000 00000000
by ?
52282308 00001555
02282308 00001C72
D2000000 00000000
by @KazoWAR
52282328 00001555
02282328 00001C72
D2000000 00000000
by @KazoWAR
5226FE50 00001555
0226FE50 00001C72
D2000000 00000000
by @KazoWAR
5226FE90 00001555
0226FE90 00001C72
D2000000 00000000
by @KazoWAR
52039288 00001555
02039288 00001C72
D2000000 00000000
by @RadDude McCoolguy
52324998 00001555
02324998 00001C72
D2000000 00000000
by @RadDude McCoolguy
52101A64 00001555
02101A64 00001C72
D2000000 00000000
-
Side effects:
- Chickens (and possibly other entities) can walk through walls a bit near the top of the screen, possibly game breaking I dont know.
- Some NPC's eyes are glitched out and are 100% round and black, they look like zombies.
by @RadDude McCoolguy

For more, check the replies of this thread, or look below for information on crafting your own code.

Crafting your own Widescreen Code!

To craft your own cheat code, there's a fair bit involved and a lot of trial and error, you will need to have a bit of time on your hands if you haven't done something like it before.

The general idea is to look for ROUND(0x1000 * 0x04 / 0x03) which is 0x1555/5461 in the games RAM while a 3D object is loaded into view.

0x1555 is the HEX value for the camera's aspect ratio, which is 4:3. Usually this value wouldn't change, but we gonna do it anyway to trick the game into thinking our "Nintendo DS" has a 16:9 (or other) display, to get it to render 3D objects accordingly.

First things first we need to find out the HEX value for the aspect ratio we want. Down below I put the formula for calculating the HEX value for any aspect ratio you want. Do that to get the HEX value for an Aspect Ratio that would be obvious, I tend to go for something outrageous like 32:9.

Now we need to find the address that holds the 1555 value. I like to use DeSmuME's RAM Searcher to search for the original 4:3 HEX value which as explained earlier is 1555(h). More than one address will show so you will have to just trial & error every one of them until it works.

Change each address's value to the test HEX value we calculated earlier with the formula, and once it actually works, write down the address you changed, it should start with "02". Enter the address into the Cheat Code Format below to finish crafting your cheat code. Feel free to change the Aspect Ratio HEX value you used in debugging with the value you actually want, it still needs to be HEX calculated with the formula below.

Code:
{Address but change the starting "02" with "52"} 00001555
{Address} 0000{Aspect Ratio HEX Value}
D2000000 00000000

While it will just work with the Address and the value of whatever aspect ratio you want, it will be applied every frame even when it may not be in use (Thanks @KazoWAR for the tip)
The first and third line essentially just does a pre-check before trying to overwrite them.
If you're confused by the format, just take a look at the above pre-made cheat codes as an example.

Aspect Ratio Value Formula by (@Vague Rant)


chart.png

HEX(ROUND(0x1000 * WIDTH / HEIGHT))

0x1000 == 4096
ROUND == round to the nearest whole number
HEX == convert decimal to hex (base10 to base16)


e.g.
HEX(ROUND(0x1000 * 16 / 9)) == 0x1C72


Common result values using this formula to spare you time:
  • 16:9 - 0x1C72
  • 16:10 - 0x199A
  • 18:9/2:1 - 0x2000
  • 21:9 - 0x2555
  • 32:9 - 0x38E4
 
Last edited by PRAGMA,

Hakaru

Member
Newcomer
Joined
Jul 31, 2019
Messages
16
Trophies
0
XP
132
Country
United States
I'm trying to create a 16:9 Patch for Solatorobo: Red the Hunter (U). However, the value 00001555 is found 15 times and changing them one by one doesn't alter screen size (at all!). I searched for 00005461 alternatively, but nothing appears. Can someone lend me a hand? What am I doing wrong, and what can I do to get this game working proper?
 

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
@Hakaru You were on the right track, Solatorobo does use 1555, not 1548. I started looking at that game and decided to put it on the backburner because however it handles aspect ratio, it looked complicated as hell. I found different addresses which affected the title screen, cut scenes, different areas in the game, etc. I tried searching for a pointer (a place in memory which "points" at another place in memory, like a signpost that says "Aspect Ratio stuff is over here!"), but I didn't find one in the time I spent on the game and I eventually moved on. I do plan to give the game another look, but yeah, it's a tough one.

I don't specifically remember if this was the case with Solatorobo, but most games don't show changes in aspect ratio immediately, you have to load a new area entirely or just reboot the game, so that may be why you weren't seeing any changes.
 

Hakaru

Member
Newcomer
Joined
Jul 31, 2019
Messages
16
Trophies
0
XP
132
Country
United States
That's some good news! Solatorobo really does deserve the HD treatment in 16:9. So glad that someone else took a look at it, even if it is on hold and a WIP. At the very least, you already found some cases where you could convert some certain elements to widescreen through 1555! I will definately wait patiently for you to revisit it, thanks!
 

Hakaru

Member
Newcomer
Joined
Jul 31, 2019
Messages
16
Trophies
0
XP
132
Country
United States
Anyone know if it's possible to widescreen hack 2D Sprite games? In particular the entire DS Pokemon Mystery Dungeon series. (Blue Rescue Team--Explorers of Time/Darkness, Explorers of Sky). Thanks in advance.
 

mhayeck

Member
Newcomer
Joined
Jul 30, 2011
Messages
5
Trophies
0
XP
10
Country
Brazil
Hi, sorry if i didn't see it, but where's the download link for desmumar? I really really really swear that i didn't found anywhere here or in other place. Or i don't need it anymore, just regular desmume? Again, sorry to bother. Anyway, you did a really nice work here!
 

Hakaru

Member
Newcomer
Joined
Jul 31, 2019
Messages
16
Trophies
0
XP
132
Country
United States
Hi, sorry if i didn't see it, but where's the download link for desmumar? I really really really swear that i didn't found anywhere here or in other place. Or i don't need it anymore, just regular desmume? Again, sorry to bother. Anyway, you did a really nice work here!

I don't know what happened to it tbh. Here's my copy of DeSmuMAR.
https://www28.zippyshare.com/v/0wdU00pI/file.html

@Hakaru You were on the right track, Solatorobo does use 1555, not 1548. I started looking at that game and decided to put it on the backburner because however it handles aspect ratio, it looked complicated as hell. I found different addresses which affected the title screen, cut scenes, different areas in the game, etc. I tried searching for a pointer (a place in memory which "points" at another place in memory, like a signpost that says "Aspect Ratio stuff is over here!"), but I didn't find one in the time I spent on the game and I eventually moved on. I do plan to give the game another look, but yeah, it's a tough one.

I don't specifically remember if this was the case with Solatorobo, but most games don't show changes in aspect ratio immediately, you have to load a new area entirely or just reboot the game, so that may be why you weren't seeing any changes.

Perhaps you could release what you did find for Solatorobo in widescreen thus far? I found the address for the title screen, nothing else. Also, could you please, pleeease consider taking another look at this game? I've been working at it for two days now with no luck. If my assumptions are correct, no widescreen value for gameplay was found in all of the 1555s. Thank you thank you thank yooou!!!
 
Last edited by Hakaru,

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
@Hakaru I've looked at the game on and off between other things and still haven't found anything very useful. There's not one address that covers a given location, e.g. the deck of the ship at the beginning of the game does not have "a widescreen address". It varies across resets, area transitions, etc. The title screen might be consistent because it's basically the first thing the game loads, so there's nothing else shuffling the memory layout around yet, but once you get in-game, all bets are off.

From what I can tell, the maps themselves include the aspect ratio value, so when the game loads a new area off the cartridge into memory, that's where the address is placed. But the game doesn't load the maps into the same place every time, so unless a pointer is found to where the map is loaded (which I haven't been able to locate so far), there's really nothing anybody can do with that information.

Without meaning to sound curt, nothing that I've found would be useful to anybody who knew what they were doing. I'm sure a more capable hacker than myself would be able to resolve this issue, but my information wouldn't be helpful to them beyond giving them the roughest idea of where in memory the game loads its levels. Regardless, here's a dump of any addresses I have written down:

0x021CEF3C: Title Screen
0x022A3F32: Ship's Deck (sometimes)
0x022A3FD6: Ship's Deck (sometimes)
0x022A3FE8: Ship's Deck (sometimes)
0x022A3FEA: Ship's Deck (sometimes)
0x022A1F2E: Inside the Ship (sometimes)
0x022A1FD2: Inside the Ship (sometimes)
0x022A1FAA: Inside the Ship (sometimes)
0x022A21FA: Further Inside the Ship (sometimes)
0x021E97E4: Medallion Cutscene (sometimes, probably, I only tested this far once)

EDIT: OK, so we may possibly have some progress finally, on my ... tenth or so attempt looking at this game. Instead of tracing back where the aspect ratio data came from (which was a "dead end" since it came from the cartridge bus and that would mean just modifying the ROM), I followed it forward to where it ended up and patched it there instead, and it seems like, I will say cautiously, more than one map's aspect ratio ends up at the same place. I don't want to go and say "all maps" or anything crazy when I've only run around the ship at the very beginning. This code also widescreens the title screen and part of the intro cutscene.

Solatorobo - Red the Hunter (USA)
Code:
16:9 Widescreen
921CEF3C 00001555
121CEF3C 00001C72
D2000000 00000000
921E97E4 00001555
121E97E4 00001C72
D2000000 00000000
5206E5D8 E1D550FA
0206E5D8 EAFE5688
D2000000 00000000
52004000 E7FFDEFF
02004000 E59F5000
02004004 EA01A974
02004008 00001C72
D2000000 00000000
unknown.png

EDIT2: Loaded up somebody's 100% save from the Internet and the widescreen appears to be holding across the entire game.

EDIT3: Europe and Japan codes.

Solatorobo - Red the Hunter (Europe)
Code:
16:9 Widescreen
921D951C 00001555
121D951C 00001C72
D2000000 00000000
921F3D44 00001555
121F3D44 00001C72
D2000000 00000000
520783E4 E1D550FA
020783E4 EAFE2F05
D2000000 00000000
52004000 E7FFDEFF
02004000 E59F5000
02004004 EA01D0F7
02004008 00001C72
D2000000 00000000

Solatorobo - Sorekara Coda e (Japan)
Code:
16:9 Widescreen
921E5BD0 00001555
121E5BD0 00001C72
D2000000 00000000
9220043C 00001555
1220043C 00001C72
D2000000 00000000
520785F0 E1D550FA
020785F0 EAFE2E82
D2000000 00000000
52004000 E7FFDEFF
02004000 E59F5000
02004004 EA01D17A
02004008 00001C72
D2000000 00000000

EDIT4: Codes updated. Their behavior should be identical, but the new version uses slightly less code.

EDIT5: Switched aspect ratio value to 0x1C72, per my reply below.
 
Last edited by Vague Rant,

Hakaru

Member
Newcomer
Joined
Jul 31, 2019
Messages
16
Trophies
0
XP
132
Country
United States
@Hakaru I've looked at the game on and off between other things and still haven't found anything very useful. There's not one address that covers a given location, e.g. the deck of the ship at the beginning of the game does not have "a widescreen address". It varies across resets, area transitions, etc. The title screen might be consistent because it's basically the first thing the game loads, so there's nothing else shuffling the memory layout around yet, but once you get in-game, all bets are off.

From what I can tell, the maps themselves include the aspect ratio value, so when the game loads a new area off the cartridge into memory, that's where the address is placed. But the game doesn't load the maps into the same place every time, so unless a pointer is found to where the map is loaded (which I haven't been able to locate so far), there's really nothing anybody can do with that information.

Without meaning to sound curt, nothing that I've found would be useful to anybody who knew what they were doing. I'm sure a more capable hacker than myself would be able to resolve this issue, but my information wouldn't be helpful to them beyond giving them the roughest idea of where in memory the game loads its levels. Regardless, here's a dump of any addresses I have written down:

0x021CEF3C: Title Screen
0x022A3F32: Ship's Deck (sometimes)
0x022A3FD6: Ship's Deck (sometimes)
0x022A3FE8: Ship's Deck (sometimes)
0x022A3FEA: Ship's Deck (sometimes)
0x022A1F2E: Inside the Ship (sometimes)
0x022A1FD2: Inside the Ship (sometimes)
0x022A1FAA: Inside the Ship (sometimes)
0x022A21FA: Further Inside the Ship (sometimes)
0x021E97E4: Medallion Cutscene (sometimes, probably, I only tested this far once)

EDIT: OK, so we may possibly have some progress finally, on my ... tenth or so attempt looking at this game. Instead of tracing back where the aspect ratio data came from (which was a "dead end" since it came from the cartridge bus and that would mean just modifying the ROM), I followed it forward to where it ended up and patched it there instead, and it seems like, I will say cautiously, more than one map's aspect ratio ends up at the same place. I don't want to go and say "all maps" or anything crazy when I've only run around the ship at the very beginning. This code also widescreens the title screen and part of the intro cutscene.

Solatorobo - Red the Hunter (USA)
Code:
16:9 Widescreen
921CEF3C 00001555
121CEF3C 00001C71
D2000000 00000000
921E97E4 00001555
121E97E4 00001C71
D2000000 00000000
5206E5D4 E2863F47
0206E5D4 E51FF004
0206E5D8 02000000
D2000000 00000000
52000020 444D4200
E2000000 0000001C
E2863F47 E52DE004
E59F5004 E49DE004
E59FF000 00001C71
0206E5DC 00000000
D2000000 00000000
unknown.png

EDIT2: Loaded up somebody's 100% save from the Internet and the widescreen appears to be holding across the entire game.

EDIT3: Europe and Japan codes.

Solatorobo - Red the Hunter (Europe)
Code:
16:9 Widescreen
921D951C 00001555
121D951C 00001C71
D2000000 00000000
921F3D44 00001555
121F3D44 00001C71
D2000000 00000000
520783E0 E2863F47
020783E0 E51FF004
020783E4 02000000
D2000000 00000000
52000020 444D4200
E2000000 0000001C
E2863F47 E52DE004
E59F5004 E49DE004
E59FF000 00001C71
020783E8 00000000
D2000000 00000000

Solatorobo - Sorekara Coda e (Japan)
Code:
16:9 Widescreen
921E5BD0 00001555
121E5BD0 00001C71
D2000000 00000000
9220043C 00001555
1220043C 00001C71
D2000000 00000000
520785EC E2863F47
020785EC E51FF004
020785F0 02000000
D2000000 00000000
52000020 444D4200
E2000000 0000001C
E2863F47 E52DE004
E59F5004 E49DE004
E59FF000 00001C71
020785F4 00000000
D2000000 00000000

After spending days delving through it, I couldn't figure out much at all. But, you've gone and finally figured it out! You just successfully modernized my favorite NDS game! You are now one of my favorite people!
 
  • Like
Reactions: Vague Rant
Proper Formula +1

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
Country
In the process of widescreening games, I've found that the way the games calculate 0x1555 is, simplifying somewhat, to do 0x1000 * 0x4 / 0x3. In decimal, that equals 5461.33333333, which you would round down to 5461, or 0x1555 in hex. Since there's already some rounding in the process of reaching 0x1555, this means any formula that aims to calculate a different aspect ratio based on 0x1555/5461 is introducing two levels of rounding errors, the original one to reach 0x1555 and a second one to reach whatever aspect ratio the user wants.

So a more correct formula to reach the desired aspect ratio would be as follows:

0x1000 * desired width / desired height

Or, if your calculator can't do hex:

4096 * desired width / desired height

e.g. For 16:9, you would do 4096 * 16/9 = 7281.77778, which we would round up to 7282, or 0x1C72, rather than the currently used 0x1C71.

For what it's worth: the difference this will make to the final picture is so fractionally small that it's almost certainly irrelevant to any possible uses.
 
  • Like
Reactions: PRAGMA

Employee426

Member
Newcomer
Joined
Oct 28, 2019
Messages
5
Trophies
0
Age
21
XP
79
Country
United Kingdom
So I saw the instructions on how to find the codes for widescreen, and since I felt nostalgic for star wars the clone wars 3, thought I'd give it a try. However after trying each one of the codes I found that not one of them affected the game at all. I always considered the possibility that I was just doing something wrong, but I couldn't see where I'd messed up.

The codes I got were:

020F0C44
021781B8
021A61A4
0226BB3E
02294800
022A4756
023A34C4
023A36B4

Any help would be appreciated greatly.
 

eXoNecro

New Member
Newbie
Joined
Jun 14, 2017
Messages
4
Trophies
0
XP
476
Country
France
Hi,
I'm not sure how it works.
I have a monitor in 16:10 with a resolution of 1680x1050, what is the largest dimension that I can choose to play the NDS?
 

Ozean_Sky

Member
Newcomer
Joined
Feb 7, 2020
Messages
8
Trophies
0
Age
25
XP
93
Country
United States
I've been sniffing around for a potential solution to minimize the stretch on the 3ds widescreen feature in Twilight Menu for Soulsilver. I've noticed people have uploaded pictures of their soulsilver and it doesn't seem so stretched.
My question is do these codes help that and if so how do I go about adding these codes
 

Pisti404

Member
Newcomer
Joined
Aug 18, 2020
Messages
5
Trophies
0
Age
20
XP
1,052
Country
Hungary
I have some codes to share. All codes are for 16:9:

Japan

  1. Code:
    5200E904 00001555
    0200E904 00001C72
    D2000000 00000000
*3D portion only, sprites remains stretched.

USAEurope

  1. Code:
    5203A298 00001555
    0203A298 00001C72
    D2000000 00000000
  2. Code:
    5203A2B4 00001555
    0203A2B4 00001C72
    D2000000 00000000

USAEurope

  1. Code:
    5201C1D8 00001555
    0201C1D8 00001C72
    D2000000 00000000
  2. Code:
    520419EC 00001555
    020419EC 00001C72
    D2000000 00000000

USA

  1. Code:
    5208CA90 00001555
    0208CA90 00001C72
    D2000000 00000000

USA

  1. Code:
    52032958 00001555
    02032958 00001C72
    D2000000 00000000

USA

  1. Code:
    5202B470 00001555
    0202B470 00001C72
    D2000000 00000000

USAEurope

  1. Code:
    521872EC 00001555
    021872EC 00001C72
    D2000000 00000000
  2. Code:
    521875EC 00001555
    021875EC 00001C72
    D2000000 00000000

USA

  1. Code:
    52141430 00001555
    02141430 00001C72
    D2000000 00000000

USAUSA (Rev 1)/Europe

  1. Code:
    521325B4 00001555
    021325B4 00001C72
    D2000000 00000000
  2. Code:
    5213131C 00001555
    0213131C 00001C72
    D2000000 00000000

USA/Europe

  1. Code:
    520489D8 00001555
    020489D8 00001C72
    D2000000 00000000

USAEurope

  1. Code:
    522B8AEC 00001555
    022B8AEC 00001C72
    D2000000 00000000
  2. Code:
    522A8C14 00001555
    022A8C14 00001C72
    D2000000 00000000

USA/Europe

  1. Code:
    5209BC58 00001555
    0209BC58 00001C72
    D2000000 00000000

USAEurope

  1. Code:
    5222431C 00001555
    0222431C 00001C72
    D2000000 00000000
    522297BC 00001555
    022297BC 00001C72
    D2000000 00000000
  2. Code:
    5222B7A4 00001555
    0222B7A4 00002000
    D2000000 00000000
    522256FC 00001555
    022256FC 00002000
    D2000000 00000000
Update #1 [09/15/2020]: Format changed, more codes
 
Last edited by Pisti404,
  • Like
Reactions: tirges

DolphinPussy

Active Member
Newcomer
Joined
Jul 29, 2014
Messages
38
Trophies
0
Age
37
XP
199
Country
United States
DeSmuME isn't next to DeSmuMAR, do you want DeSmuMAR to automatically download the latest DeSmuME DEV Build from 'ci.appveyor.com/project/zeromus/desmume'? (y/n)

y
Fetching Latest Job ID...FAILED! The response from AppVeyor was unexpected. Closing DeSmuMAR in 5 seconds..
Dang, what can I do about this?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night