Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua shell support #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Lua shell support #60

wants to merge 3 commits into from

Conversation

cnvogelg
Copy link
Contributor

This patch adds a lua shell to FS-UAE.

When enabled with lua_shell = 1 you can connect via telnet to localhost:6800 and enter the shell.
There you can enter lua expressions that will be run inside FS-UAE's lua interpreter.
You can access all of FS-UAE's lua commands.

This patch also cleans up the lua scripting: Make sure to use the same libs in all lua states and ensure that Lua is only used while the emulation core is running. It re-factored the libraries with the available commands and adds new commands to access the floppy and CDROM drive images.

Furthermore, a tools directory was added with two python3 tools: fs-uae-ctl and fs-uae-ctl-ui.
They allow to manage the floppy and CDROM images while FS-UAE is running. The first tool is command line only the second UI uses PyQt4 and offers a UI. Additionally, a python library was added to simplify the access to the Lua shell of FS-UAE from external tools.

More details of this feature can be found on EAB: A lua shell for FS-UAE.

It would be great to see this feature on mainline FS-UAE :)

@cnvogelg
Copy link
Contributor Author

cnvogelg commented Apr 8, 2015

I just cleand up the patch to contain only a single commit with all changes and rebased it to the current head

@grovdata
Copy link

grovdata commented Jul 7, 2017

Would be nice if this got merged someday, very useful for developers.

@tetracorp
Copy link

@cnvogelg I hope you don't mind me asking here, but I've heard a legend that FS-UAE has a Lua scripting interface, but I can't find any documentation at all about how to use it. Can you explain how to use it?

@tetracorp
Copy link

I discovered the answer to my own question. For anyone who's researching the topic, the way to use the scripting interface appears to be that FS-UAE loads default.lua in the current working directory at startup. You need to recompile FS-UAE with the --enable-lua option for it to work.

I've written an article on the topic which covers the Lua scripting interface, including cnvogelg's interactive terminal patch, and provides partial documentation.

Regarding this pull request, it still works fine on 3.1.66, but requires slight adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants