Desmume Lua51.dll

1 view
Skip to first unread message

Mauricette Atencio

unread,
Jul 25, 2024, 10:20:51 PM7/25/24
to Pediatri.B'11

Hello, I'm having a problem with lua51 on stable releases and source code. I downloaded and compiled a source code binary, as well as the lua binary within it at the same time, but when I set my path to direct to lua's containing folder, it still show the error: lua51.dll was not found.

I downloaded the lua51.dll as well as the lua5.1.dll, put both of them inside the folder where desmume_0.9.11_x64 was located, but I keep getting the same error. The lua file isn't the problem, as I can run it using cmd quite well, it's desmume which is causing an issue.

I've been sitting on this for a while(years) now and decided to clean it up a bit and post it. This script allows you to play Metroid Prime hunters with a controller with smooth camera movement.
Some small snippets(like subweapon switching) were borrowed from =10957 .
This may only work on the Windows version of DeSmuME, I'm not sure.

The way aiming works is the center of the screen is continually pressed and the script injects stylus movement into the game's memory. If you need to manually use the touchscreen then use select+left bumper to toggle aiming on or off. That shouldn't be necessary with the existence of the virtual stylus, though.

Updated the script to include a "virtual stylus" for navigating stuff like your ship and the main menu. When holding select(on an xbox style controller) a virtual stylus will be displayed. It can be moved with the right stick and touch the screen with the right bumper. You can still toggle manual touchscreen input if needed with select + left bumper.

I'm actually new to adjusting scripts in DesMume and I'm a visual learner, so I was wondering if you could post of video of how to do this? (I'm sure you would get a lot of views on youtube as well considering no one has done this.)
I always wanted to play Metroid prime hunters but trying to use my right hand for my laptop's mouse and my left hand for the controller is a horrible gaming experience.

Copy the script from my post into a text file and rename the extension to ".lua". In DeSmuME once the game is running go to "Tools -> Lua Scripting -> New Lua Script Window...". In the new window that pops up hit browse and select the script you saved and it will start running.


You should see output similar to this, but different depending on your controller and how many of them you have hooked up.
The white number on the left is the controller id. When you press a button it will turn red to help you identify which button corresponds to which number.
In the main script you can then adjust joyid and the controls with the values you find here.

Also, it looks like input in Lua was broken for the last month in DeSmuME builds, but is now fixed. If you get an error when trying to run one of the scripts then make sure you have an up-to-date build of the emulator.

I use a PS5 controller and have managed to remap everything properly and even with the virtual stylus the right analog stick works perfectly. It's just when it comes to aiming in the game and looking around it just will not work. I even tried using DS4Windows and Steam to help treat it as an xbox controller but still no luck. I don't have any other country to test this with sadly.

I'm not really smart when it comes to scripting so I don't know what I'm supposed to do to fix this or if there is a fix. Again, everything is working fine with the buttons except that one thing, aiming/looking around. If anyone has an answer that would be appreciated.

we should fix whatever problems make it hard to use lua in desmume (dont you have to scrounge up the dll or something) and then include some good scripts in the repository as part of a perks pack for next time we make a release (whenever that may be...)

Hi....The hardest parts are tracking down the API for the emulator, and observing a bundle to peruse regulator input. When you have those two things, utilizing them is really clear, and I (or another person on these sheets) ought to have the option to help you through it.

DeSmuME's API should be distributed some place... if not it'd be totally unusable. Like I said... if you ask on that emu's discussions, somebody ought to have the option to guide you to something you can utilize.

With respect to the bundle, that may be trickier... as I'm not even certain if one exists. What you need is an overall Lua bundle for getting regulator input - it doesn't need to be explicitly for DeSmuME. What's more, truth be told, there most likely isn't something explicitly for DeSmuME.

Somebody please help me, I can't for the life of me get this working, as soon as I start the lua script the controls go crazy, the camera starts spinning in circles and I can't do anything. I'm using the latest desmume and the dll files are there, i'm using DS4 Windows and a ps4 controller which is recognized as a xbox 360 controller. I'm really not sure what im doing wrong and I have honestly spent most of this day looking into this to no avail. Please help

It's also mentioning there are lots of good FPS games on DS that rely upon stylus for aiming, such as Dementium, Moon, four Call of Duty games, etc. Having these games working with controllers by this same approach would be great. Might check the possibility of porting this script to these games later (might need to pass through Lua's learning curve).

Oh, a feedback from my end: The Lua script didn't work when I tried using the latest stable version v0.9.11. I got both x64 versions of Desmume and Lua DLL, but when trying to run the Lua script, I kept getting the following error:

Looks like it's having trouble detecting my controllers, even though I have a single xbox360 controller plugged in. The same error also occurred with the Desmume x432r version with HD support, and makes sense since it's based on older versions of the emulator.

My solution for this problem was: Instead of getting the v0.9.11 stable version (which is mentioned to have some problems), I got the latest build from this link, as mentioned in the Downloads section. With that version, my controllers were detected properly, and I managed to play the game with it.

The lua51.dll is correct, I'm using the latest version of x64 DeSmuME, I tried other games and other scripts (such as a free camera script) but LUA scrips just won't run for me at all. I know there's probably a very simple and dumb solution for what I'm experiencing if anyone could point it out for me?

I realize this is necroposting, however this thread is the first one that pops up on search results when it comes to this subject. I've created a script with some custom libraries that add some solid keyboard and mouse controls to the game. I figured I'd share it here since this is likely where people will find it and if anybody else down the line wants to try out the game with keyboard and mouse controls, this just might be the first publicly posted way.

Errors related to lua51.dll can arise for a few different different reasons. For instance, a faulty application, lua51.dll has been deleted or misplaced, corrupted by malicious software present on your PC or a damaged Windows registry.

In the vast majority of cases, the solution is to properly reinstall lua51.dll on your PC, to the Windows system folder. Alternatively, some programs, notably PC games, require that the DLL file is placed in the game/application installation folder.

Do you have information that we do not?
Did our advice help or did we miss something?
Our Forum is where you can get help from both qualified tech specialists and the community at large. Sign up, post your questions, and get updates straight to your inbox.

Generates a Lua script that draws the emblem for you. To install Lua, download it from SourceForge, put the DLL file in the same directory as DeSmuME, and rename it to lua51.dll (also, make sure you are using the latest 64-bit version of DeSmuME). Then, go to the emblem drawing screen and run the script by going to Tools > Lua Scripting > New Lua Script Window... > Browse...

Descarga el siguiente lua51.dll para resolver tu problema dll. En este momento tenemos disponibles 3 versiones diferentes de este archivo.
Elige sabiamente. La mayora de las veces basta con elegir la versin ms alta.

Los errores relacionados con lua51.dll pueden producirse por distintas razones. Por ejemplo, una aplicacin defectuosa, lua51.dll, se ha eliminado o ubicado de forma incorrecta, ha sido corrompida por un software malicioso en tu PC o un registro de Windows daado.

En la mayora de los casos, la solucin consiste en volver a instalar adecuadamente lua51.dll en tu PC, en la carpeta de sistema de Windows. Por otra parte, algunos programas, sobre todo los juegos para PC, requieren que el archivo de DLL se encuentre ubicado en la carpeta de instalacin del juego/aplicacin.

Tiene informacin que nosotros no?
Fueron de ayuda nuestros consejos o nos hemos perdido algo?
Nuestro foro es donde puede obtener ayuda de los especialistas cualificados tecnologa y la comunidad en general. Inscrbase, enve sus preguntas, y obtenga actualizaciones directamente en su bandeja de entrada.

Tlchargez lua51.dll ci-dessous afin de rsoudre votre problme de fichier dll. Nous avons actuellement 3 versions diffrentes de ce fichier disponibles.
Choisissez de manire avise. La plupart du temps, il suffit de choisir la version au numro le plus lev.

Reply all
Reply to author
Forward
0 new messages