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,

TSP184

Well-Known Member
Newcomer
Joined
Oct 26, 2018
Messages
77
Trophies
0
Age
19
XP
788
Country
France
If you open PowerShell as Admin, then type
Code:
cd "C:/folder/where/desmumar/is"
and then proceed to type
Code:
.\DeSmuMAR.exe
it should then provide you with a log of text. If so, what does it state?
Understood, thanks.
 

hoshea

Member
Newcomer
Joined
Mar 17, 2015
Messages
17
Trophies
0
Age
29
Location
Surabaya, Indonesia
XP
241
Country
Indonesia
Quite odd. Perhaps you are needing to install .NET Core 3.1 Runtime: https://dotnet.microsoft.com/download/dotnet/3.1

I'm just curious, so I tried to redownload Desmume through Desmumar,

Code:
There's no "DeSmuME.exe" next to DeSmuMAR, want to automatically download the latest Dev build? (y/n)
yDownloading...
Fetching API Data of AppVeyor: zeromus/desmume
 + Obtained
 + Job ID ihjh5nqrcgm4bv64 discovered
Downloading DeSmuME-VS2019-x64-Release.exe Job Artifact...
 - Failed! A Web Exception occured: The remote server returned an error: (404) Not Found.
Failed to download DeSmuME, closing DeSmuMAR...

I'm guessing there's something wrong with the Desmume's artifact links.. maybe,
Know nothing abut Appveyor-thingy, I'm just guessing though.
 

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,035
Country
Ireland
Just tried that; Same result. My laptop is brand-new, so maybe there's something else I haven't installed?
I'm really not sure then

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

I'm just curious, so I tried to redownload Desmume through Desmumar,

Code:
There's no "DeSmuME.exe" next to DeSmuMAR, want to automatically download the latest Dev build? (y/n)
yDownloading...
Fetching API Data of AppVeyor: zeromus/desmume
 + Obtained
 + Job ID ihjh5nqrcgm4bv64 discovered
Downloading DeSmuME-VS2019-x64-Release.exe Job Artifact...
 - Failed! A Web Exception occured: The remote server returned an error: (404) Not Found.
Failed to download DeSmuME, closing DeSmuMAR...

I'm guessing there's something wrong with the Desmume's artifact links.. maybe,
Know nothing abut Appveyor-thingy, I'm just guessing though.
Yes, so, AppVeyor only stores artifacts for each commit for 1 month. https://www.appveyor.com/docs/packaging-artifacts/#artifacts-retention-policy

The last commit was 1 month ago, hence right now, there's no pre-compiled builds available for download so the script fails to find one :(
 

Deleted member 440156

Active Member
Newcomer
Joined
Jan 14, 2018
Messages
39
Trophies
0
XP
272
Country
United States
So, I decided to use the Retroarch version, and I'm trying to figure out which aspect ratio I need to make both screens 16:9. I guessed it was 16:18 (8:9). That wasn't a preset ratio, so I used the custom ratio to set it to 640x720. Is this correct? I just wanted to check, because it does look a bit off, but that might just be the widescreen hack I used.
 
Last edited by Deleted member 440156,

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,035
Country
Ireland
So, I decided to use the Retroarch version, and I'm trying to figure out which aspect ratio I need to make both screens 16:9. I guessed it was 16:18 (8:9). That wasn't a preset ratio, so I used the custom ratio to set it to 640x720. Is this correct? I just wanted to check, because it does look a bit off, but that might just be the widescreen hack I used.

If you're setting an Aspect Ratio (not resolution) then using resolutions as your aspect ratio is just being inefficient. E.g. 1920x1080 is the same as 16x9, innefficient. Anyway, I always recommend people to use the aspect ratio 16:10, regardless what system they are on as it provides much cleaner linear pixel scaling compared to 16:9.
16/9: 1.77777777778* repeating
16/10: 1.6

Not what it does, but, imagine upscaling pixels by a factor 1.77777777778* repeating compared to a clean 1.6

Ozoihbi.png


Here's an example of the inefficient non-linear pixel scaling that can happen in odd cases like this where either the aspect ratio is non-linear, or the window combined with the aspect ratio is non-linear (aka window is slightly too long or not long enough by even 1 pixel, or the aspect ratio used in the cheat is off by even the smallest amount)
 
Last edited by PRAGMA,

asorion

New Member
Newbie
Joined
May 18, 2021
Messages
1
Trophies
0
Age
30
XP
32
Country
Germany
jsut found this thread and tried everythin. my problem is when ever i startDeSmuMAR it jsut isntantly closes on me. its in admin mode and in the right folder
 
Joined
Dec 17, 2020
Messages
7
Trophies
0
XP
41
Country
Argentina
Can anyone post the codes for Pokémon games (Eur) in 16:10 aspect ratio? I want to play them in my Twilight Menu ++ with widescreen mode activated and see how they look! Thanksss
 

UppityPython

New Member
Newbie
Joined
Jan 27, 2021
Messages
2
Trophies
0
Age
25
XP
49
Country
Canada
Is it possible to make Pokémon B/W 16:9 but not have it affect the 2D art? Dialogue boxes, battle scenes, etc…? Just curious!
 

EddieEddie90

Well-Known Member
Member
Joined
Apr 24, 2016
Messages
231
Trophies
0
Age
30
XP
929
Country
Mexico
Metroid Prime Hunters (PAL)

52111ADC E5991664
02111ADC E3A01090
D2000000 00000000
5211D114 E59A1664
0211D114 E3A01090
D2000000 00000000
92111300 00001555
12111300 00001C72

Can somebody convert it to USA region? Pretty please :(
 

rapha99

New Member
Newbie
Joined
Mar 5, 2022
Messages
1
Trophies
0
Age
24
Location
Florida
XP
26
Country
United States
Dragon Quest IV (J) - in 16:10 so as to prevent non-linear pixel upscaling

5214CF3C 00001555
0214CF3C 0000199A
D2000000 00000000

I also wanted to ask if there was a way to prevent UI elements, text boxes, menu screens, etc. from stretching with a code like this. Thanks!
 

Desconocido90

Well-Known Member
Newcomer
Joined
May 10, 2016
Messages
82
Trophies
0
Age
34
XP
834
Country
anyone have a code for kingdom hearts recoded (U) widescreen?
There are codes for that game in the widescreen DS-on-3DS thread.
They're 16:10, though, but to change them to 16:9 you only have to replace 0000199A by 00001C72.

Like this:
Code:
16:9 Widescreen for 3DS
9202A810 00001555
1202A810 00001C72
D2000000 00000000
I hadn't tested it, so I have no idea if it will work well on a DS emulator (sometimes DS-on-3DS widescreen codes alter other things, like swapping screens, to adapt it better to 3DS)
 

DarklyBre

New Member
Newbie
Joined
Aug 4, 2022
Messages
1
Trophies
0
Age
21
Location
Wesselburennerkoog
XP
23
Country
Germany
Sorry for the dumb question, but I have a little bit of a problem with the process of "searching".
I only have a phone (Samsung Galaxy A52) with an 21:9 resolution and I have the german pokemon games (every ds game).
My question in this case: can someone look for me for them because I don't have a computer and the knowledge for searching within the games code for the HEX-values.

P.S: the ds games I have are not the European versions! They are called (by DeSume) "Germany" in the country-section.
 

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,035
Country
Ireland
Sorry for the dumb question, but I have a little bit of a problem with the process of "searching".
I only have a phone (Samsung Galaxy A52) with an 21:9 resolution and I have the german pokemon games (every ds game).
My question in this case: can someone look for me for them because I don't have a computer and the knowledge for searching within the games code for the HEX-values.

P.S: the ds games I have are not the European versions! They are called (by DeSume) "Germany" in the country-section.
Can you confirm what region the ROMs are because the "Germany" country selection you refer to may just be the "NDS System Region" dropdown or language selection, I don't particularly know but regardless "country-selection" sounds like it can be changed from within DeSmuME. A ROM cannot just change region at will.

Try use InsaneNutters header tool on your ROM to view info about it and get back to us: https://digiex.net/threads/nds-header-tool-2-view-info-on-nds-roms.14990/
 

BlinksTale

New Member
Newbie
Joined
Jan 14, 2016
Messages
2
Trophies
0
Age
34
XP
52
Country
United States
There are codes for that game in the widescreen DS-on-3DS thread.
They're 16:10, though, but to change them to 16:9 you only have to replace 0000199A by 00001C72.

Like this:
Code:
16:9 Widescreen for 3DS
9202A810 00001555
1202A810 00001C72
D2000000 00000000
I hadn't tested it, so I have no idea if it will work well on a DS emulator (sometimes DS-on-3DS widescreen codes alter other things, like swapping screens, to adapt it better to 3DS)

This helped a lot, thank you!

First draft for Golden Sun Dark Dawn 16:9 Widescreen:
16:9 Widescreen
920793DC 00001555
120793DC 00001C72
D2000000 00000000

It looks like the formula is (16/9)*4096=7281.77777778 (roughly 7282) and then 7282 in hex is 0x1C72 (ie. 00001C72?)

Just leaving the math here so other hobbyists can turn 21:9 into 9557.333 (ie. 00002555) or 32:9 into 14563.5555556 (ie. 000038E4)

It also looks like these three lines are the only ones that matter for widescreen usually? Though Golden Sun here has some clipping issues where the near plane of the camera is too close to the characters at this wider angle now (or something) so some further hacks may be required to get it to play nicely.
 
  • Like
Reactions: Desconocido90

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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...