top of page
Writer's picturereadsbyfarcazelagg

How to Easily Set Up a Controller on Desmume and Start Playing Right Away



So I plug in my Xbox Controller, load up DeSmuME, click Config > Control Config, but when I move a stick or press a button on the xbox controller, nothing happens, it acts like there is no button input. All other emulators and games work just fine with the controller, so it's likely not something with the controller or drivers.


The odd thing was, it worked fine with 0.9.8, but due to issues I was having involving save paths and whatnot, I ended up deleting it entirely. I then redownloaded both 0.9.8 AND 0.9.9 and neither of them worked with the controller. I've tried different USB ports as well.




how to use controller on desmume




Everywhere else uses xinput and desmume uses directinput. It's a bug in your gamepad driver. You may have to use a 3rd party driver or some external pad mapping utility to make it behave differently. Also try rebooting your computer if you haven't done that yet.


I had this issue as well, and here's what worked for me.I enabled Switch Pro Controller configuration in Steam, and added Desmume to Steam as a non-steam game.Then when I launch Desmume through Steam, the controller works perfectly.I also had to make sure my desktop controller configuration in steam was set to a default gamepad layout, because for some reason that's what it uses when desmume is focused (not the game-specific config)


In 0.9.5, the default location for .dsv files changed. Older versions would use the rom directory; and now in Windows it is the directory that the emulator runs from; and in OSX/Linux it is /.config/desmume. In Windows, use the path configuration to point to wherever your .dsv files are or copy them to the new spot. If you've been running into problems with this you can probably verify it by searching for *.dsv on your hard disk and finding duplicates. Be careful when copying files around that you don't overwrite files unintentionally.


To set up custom controls for the DS emulator, go to Config > Control Config. You can now remap the controls to what you want. Connect it to your PC and remap the controls if you want to use a controller. All you need to do is replace the input command highlighted in green with the one you want to use instead.


I finally got around to working on my DS set and I am all done except for 1 button press. In DeSmuME the mouse and left click is used as the stylus for the DS. I came across this tutorial but I cannot entirely figure it out. I have Xpadder setup to use the left joystick on my controller as the mouse movement and that is working fine. The problem is I cannot figure out the left click part. I would like it set to A on my controller which is mapped to B within DeSmuME, which is X on my keyboard.


You need to go into Xpadder (obvs?) and click the button you want to assign on the controller. When the keyboard pops up, click the mouse button needed on the left. Then reopen that window and click Advanced. Once you are in there you can see the mouse click at the top. Click the empty cell next to it and assign it whatever keyboard key you want.


When I setup the controller on desmume through bluetooth, it will stop responding or run forward non stop. If I connect through USB it works perfect. The controller works normal in every other emulator, and program.


which operating system? In windows, I can't believe desmume even knows how you have anything connected. Check event viewer and look for the faulting module to be somewhere in a dll that isn't ours and is related to controller drivers or "gaming enhancement" software--not our problem, in that case.


By setting up your Controller DeSmuME, you can play games using your computer or nearly all compatible controllers. You can set up your keyboard or gamepad by clicking on the menu Config > Control Config in the Control menu.


It is best to use the console controller to emulate it. You can use these controllers on your PC with a variety of adapters: Mayflash adapters are well suited and relatively inexpensive. You can also purchase pre-made adapters for your NES/SNES controller from RaphNet.


DeSmuME uses DirectInput if an Xbox 360 controller is being used. No support for XInput exists. This will be noticeable if an Xbox 360 controller's LT and RT inputs are mapped to emulate the DS's L and R buttons respectively.


The latest development version of RetroArch DeSmuME core also has an option to increase internal resolution which can be set using desmume_internal_resolution in Core Options. This option was added in August 8, 2015 commit. This is massively CPU-intensive because only SoftRasterizer exists in RetroArch core.


In case you don't understand what the title means, I'll give an example. If you're playing this game on emulator, you may have noticed you have to use the mouse to use a Vibe ability. Because of that, you may need to interrupt your gameplay very often to use the mouse. With this, instead of using the mouse, you can just use another button from your keyboard or controller to trigger the Vibe ability.


The first step is to figure out how you want your controls to look like. I personally use a PC controller very similar to a PS3 controller. With that, I use the D-pad, the 4 face buttons, and 2 of the triggers as the regular DS buttons. But I also use both analog sticks to trigger the 4 Vibe abilities. Left stick up means Joy, Left stick down means Gloom, Right stick up means Rage and Right stick down means Calm. It may not be the best control scheme, but it definitely works for me.


In case you don't understand what the title means, I'll give an example. If you're playing this game on emulator, you may have noticed you have to use the mouse to use a Vibe ability. Because of that, you may need to interrupt your gameplay very often to use the mouse. With this, instead of using the mouse, you can just use another button from your keyboard or controller to trigger the Vibe ability.For this, I'll be using a Lua script, on Desmume 0.9.11. I've tried with newer builds of Desmume, but the script ends up crashing due to it being more unstable, so I really recommend 0.9.11.# ControlsThe first step is to figure out how you want your controls to look like. I personally use a PC controller very similar to a PS3 controller. With that, I use the D-pad, the 4 face buttons, and 2 of the triggers as the regular DS buttons. But I also use both analog sticks to trigger the 4 Vibe abilities. Left stick up means Joy, Left stick down means Gloom, Right stick up means Rage and Right stick down means Calm. It may not be the best control scheme, but it definitely works for me.# Downloading the Lua scriptHere is the link to the file, it would be a good idea to have it on the same directory as Desmume. _touch.lua/fileBut that's not all, for the emulator to recognize and run a Lua script, you need two different .dll files. Make sure to choose the one you need.64bit: -5.1.5_Win64_dll16_lib.zip/download32bit: -5.1.5_Win32_dll16_lib.zip/downloadOnce you have downloaded the .zip, extract it, and move the two .dll files at the same directory as Desmume.*IMPORTANT: Rename "lua5.1.dll" to "lua51.dll", due to how old Desmume is, it will only recognize that name!*# Modifying the scriptFirst, make sure you have your main controls set up in Desmume (Config --> Control Config)After that, decide which 4 keyboard buttons you want to use for the Vibe abilities. Make sure that they don't interfere with anything else (Hotkeys on the emulator or on livesplit, something that makes a menu pop up, etc.)Once you have decided, you'll need to modify the Lua script. Here's how it's done.First, the code looks like this:[quote]while true doif input.get().numpad4 thenstylus.setx=40, y=40, touch=trueendif input.get().numpad5 thenstylus.setx=210, y=40, touch=trueendif input.get().numpad1 thenstylus.setx=40, y=140, touch=trueendif input.get().numpad2 thenstylus.setx=210, y=140, touch=trueendemu.frameadvance()end[/quote]Do you see those `input.get().` commands? whatever they have afterwards is what each Vibe ability corresponds to. So in the default code, Numpad 4 corresponds to Joy, Numpad 5 corresponds to Rage, Numpad 1 corresponds to Gloom and Numpad 2 corresponds to Calm.All you need to do is change `numpad4`, `numpad5`, `numpad1` and `numpad2` to whatever keys you want.Here is how to write every key in the keyboard:* **Locks**: "capslock", "numlock", "scrolllock"* **Numbers**: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"* **Letters**: "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z* **Function keys**: "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24"* **Directional Keys**: "left", "up", "right", "down"* **Numpad**: "numpad0", "numpad1", "numpad2", "numpad3", "numpad4", "numpad5", "numpad6", "numpad7", "numpad8", "numpad9", "numpad*", "numpad+", "numpad-", "numpad.", "numpad/"* **Others**: "backspace", "tab", "enter", "shift", "control", "alt", "pause", "escape", "space", "pageup", "pagedown", "end", "home", "insert", "delete", "semicolon", "plus", "minus", "comma", "period", "slash", "backslash", "tilde", "quote", "leftbracket", "rightbracket"Once you have modified your script, save it as SPP_touch.lua (in other words, don't change its name)# How to run the Lua scriptOn Desmume, go to Tools --> Lua Scripting --> New Lua Script Window...On that new window, press Browse... and open SPP_touch.luaThe code should now be running and you can test it by loading the ROM and trying to use the Vibe abilities using the keys you assigned.# What about Controller?This is where it gets a bit more complicated. Lua doesn't have a way to read controller inputs directly. That means that you'll have to map controller inputs to keyboard.Fortunately, there's an easy way to do that with Joy2Key ( )All you need to do is map the controller inputs you want to the keyboard keys that you assigned to your Vibe abilities.# Example of mapped inputsHere's a video example of myself playing the game, using analog sticks to trigger the Vibe abilities: =c2WVD8pL7Z0# Help/ContactSince I'm really bad at explaining things, I imagine there's going to be some questions about this. If you have one, please @ me on the Super Princess Peach Discord or DM me (Discord Tag: JuegAriel#7418)Anyways, I hope all of this helped some new runners get into this!-JA 2ff7e9595c


2 views0 comments

Recent Posts

See All

Comments


bottom of page