Tutorial
Updated
How to play NDS Games in HD Widescreen (16:9, 21:9, 32:9)!
~ Pokémon Diamond Version in 3840x1080 HD (32:9 1080p) with 3D Rasterized in x16 Native Resolution (Captured from Retroarch DeSmuME core)
Notes
- 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.
- 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
- Stretch the emulator's output to be the wanted Aspect Ratio. Either by code, settings, wrapper applications, or manually.
- Add a cheat code (which can be found below) for the games and Aspect Ratio you wish to use.
- 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
- 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. - 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. - 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! - 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.
- 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.
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
5201E9E4 00001555
0201E9E4 00001C72
D2000000 00000000
by ?
0201E9E4 00001C72
D2000000 00000000
by ?
5202022C 00001555
0202022C 00001C72
D2000000 00000000
by ?
0202022C 00001C72
D2000000 00000000
by ?
52022F80 00001555
02022F80 00001C72
D2000000 00000000
by ?
02022F80 00001C72
D2000000 00000000
by ?
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
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)
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,