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,

iMagic16

Member
Newcomer
Joined
May 24, 2019
Messages
18
Trophies
0
Age
27
XP
95
Country
United Kingdom
Hi, I put 2160 in for the resolution and the app crashes. Is 4k officially supported? how can I make it work?

Resolution: 3840x2160
 

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,125
Country
United States
May I ask how you found these, and why they are different the all other games?

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

Well cool, guess that's all the core series Pokemon DS Games in Widescreen! :D, It's possible to do this in a multitude of other games, so perhaps I may remodel this tutorial into a more inclusive tutorial soon giving addresses for other games aswell?

search memory for 0x00001555 and test. btw as these are not always in memory based on what is on the screen. you could unintentionally be overwriting other data that could have harmful effects. the 3 line codes check if the default value for 4x3 in in memory then writes once, only having the second line cause it to write the value every frame, even if thats not what is currently in memory.
 

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,036
Country
Ireland
search memory for 0x00001555 and test. btw as these are not always in memory based on what is on the screen. you could unintentionally be overwriting other data that could have harmful effects. the 3 line codes check if the default value for 4x3 in in memory then writes once, only having the second line cause it to write the value every frame, even if thats not what is currently in memory.
Technically with it doing it every frame it could also have some minor performance impact, unlikely but it is possible.
Thank you for explaining :)
 

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,036
Country
Ireland
Modified the tutorial to not be restricted to only pokemon since this applies to tons more games.
Added Mario Kart DS using Kazo's Ingame race address.
Btw @KazoWAR 12147E04 00003D30 this code taken from a youtube video seems to somehow do 16:9 pretty well and SEEMS to apply everywhere but im not fully sure.
Its weird too cause its number works differently, its original isnt 0x1555 afaik
 

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,125
Country
United States
Modified the tutorial to not be restricted to only pokemon since this applies to tons more games.
Added Mario Kart DS using Kazo's Ingame race address.
Btw @KazoWAR 12147E04 00003D30 this code taken from a youtube video seems to somehow do 16:9 pretty well and SEEMS to apply everywhere but im not fully sure.
Its weird too cause its number works differently, its original isnt 0x1555 afaik
it seems to be editing an opcode in the games code.
 
  • Like
Reactions: Sliter

concept8192

Well-Known Member
Newcomer
Joined
Nov 24, 2017
Messages
57
Trophies
0
XP
761
Country
United States
Is there a tutorial out there on how to do this on Drastic (like OP said: "DraSticDS for Android should work as you can in fact stretch its emulated screen and use cheats!") I know how cheats work, just not stretching the screen.
 

Scarlet

Onion Soup
Editorial Team
GBAtemp Patron
Joined
Jan 7, 2015
Messages
5,144
Trophies
2
Location
Middleish North-Right
Website
scarlet.works
XP
14,769
Country
United Kingdom
Is there a tutorial out there on how to do this on Drastic (like OP said: "DraSticDS for Android should work as you can in fact stretch its emulated screen and use cheats!") I know how cheats work, just not stretching the screen.
You just have to switch the layout to stretch to the full screen and enable high res 3D rendering in settings and all works fine. Really simple!
 
  • Like
Reactions: PRAGMA
D

Deleted User

Guest
Not sure how well these work since I did them quickly but

Sonic All-Stars Racing:
02039288 00001C71

Star Fox Command:
02324998 00001C71

Zelda Phantom Hourglass:
52101A64 00001555
02101A64 00001C71
D2000000 00000000
 
Last edited by ,

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,258
Trophies
1
Location
Ireland
Website
github.com
XP
5,036
Country
Ireland
Not sure how well these work since I did them quickly but

Sonic All-Stars Racing:
02039288 00001C71

Star Fox Command:
02324998 00001C71

Zelda Phantom Hourglass: (This one crashes upon loading screens for some reason)
02101A64 00001C71
I dont have these games prepared with saves on my end, but for zelda, could you instead try:
Code:
52101A64 00001555
02101A64 00001C71
D2000000 00000000
See if that fixes the crashes

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

Edit, booted up since this game doesnt rlly need a save to get into 3D stuff, so yeah this code seems to work and the code fix I suggested seems to fix crashes (ive encountered no crash).
But this seems to have side effects, the calculation for chickens is a bit off now, so they can walk to walls near the top of the screen XD, one of them went through a house, other through a wall.
And some eyes of the NPC's are 100% black, like zombies or something. Creepy stuff.
 
  • Like
Reactions: Deleted User
D

Deleted User

Guest
I dont have these games prepared with saves on my end, but for zelda, could you instead try:
Code:
52101A64 00001555
02101A64 00001C71
D2000000 00000000
See if that fixes the crashes
Yeah that does fix it, thanks
 
  • Like
Reactions: PRAGMA
D

Deleted User

Guest
Great for the other 2, could you use DeSmuMAR and send over screenshots showing 3D areas being widescreen?
Yeah, here you go
 

Attachments

  • Annotation 2019-05-25 144557.png
    Annotation 2019-05-25 144557.png
    385.7 KB · Views: 259
  • Annotation 2019-05-25 144640.png
    Annotation 2019-05-25 144640.png
    427 KB · Views: 276

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: aeiou