Good afternoon, trainers and hackers alike.
It has come to a numerous amount of people (including myself) that DeSmuME is slow and laggy with games like Pokemon 4th gen or HG/SS. With version 0.9.9, these issues are fixed due to a wonderful new feature, known as the dynamic recompiler. If you know your way around the settings already, the tl;dr is, go to emulation settings, turn the dynamic recompiler on 100. Now, the following guide will explain - in depth - how to maximize the efficiency of the DeSmuME NDS emulator.
You're going to want a clean install of version 0.9.9, which can be found here. This will take you to a page of desmume.org; from here there is a download link which one *should* be able to find without issue.
After you download this, extract it wherever, casual stuff. Now, run the DeSmuME_0.9.9_x86.exe; you should have a screen like this:
Click 'View', mouse over 'HUD' and check 'Display FPS'. This isn't required, but it'll show you what your FPS is, so you'll see the difference.
There are also other options in the 'View' menu - such as screen split - that you might want to play with, but it's up to you.
Now we're getting somewhere; mouse over the 'Config' and then click 'Emulation Settings'
This should have opened a nice popup window; on the right side of this, check the 'General' section and make sure that 'Enable Advanced Bus-Level Timing' is disabled (not checked).
A little bit below this, you'll see a section that says 'CPU Emulation Mode' turn on (check) the 'Use Dynamic Recompiler' and leave the box at 100. This will help a lot with FPS issues.
Almost finished, just one last bit. Go ahead and close that window; click 'Config' again, and this time click '3D Settings'. Disable, 'Unrealistically High-Precision Color Interpretation', 'Enable Edge Marking', 'Enable Fog' and 'Enable Line Hack'. Please note that in some areas of certain games you may need to re-enable Fog. Your settings should now look as such:
Load up a ROM of your choice and do a bit of playtesting. See a difference? You might need to go back to the 3D Settings and change the rasterizer until you find the one that works best on your graphics card.
If problems still persist:
No luck? Well, first let's make sure VSync is OFF. Click 'Config', mouse over 'Display Method' and verify that 'VSync' is turned off. VSync attempts to make sure that your CPU is running at the speed of your monitor's refresh rate. If you're having FPS issues, you probably don't need to worry about the two getting out of sync.
Hopefully this guide helped you; it helped me atleast. If you have any questions, don't hesitate to ask; either myself or someone else would be more than willing to help.