Comments (5)
Reopened because brainstorming never hurts :D
from cemu.
Since I work on C++<->Lua integration on a daily basis at work, I feel like I would be inclined to think about some Lua(/LuaJIT) integration into CEmu.
After all, Lua is probably the most fitted language for scripting within that kind of host.
https://github.com/ThePhD/sol2 looks interesting to provide nice C++ wrappers/helpers.
Ideally, the main core functions would be exposed, including debugging-related ones, and of course all of the GUI should be accessible programmatically too.
Once all that is "done", using Lua for scripting would supersede the JSON autotester files, for instance, right now relying on an array of semi-hardcoded actions to do the work (which works, but isn't as nice as it could be with proper scripting APIs built-in)
I'm assigning myself to this task, but oh well, I have no idea when I'm going to work on that. CEmu might reach 3.0 by then :P
Any ideas/suggestions/brainstorming/comments welcome...
from cemu.
For fun, I added a few lines here and there on a with_lua branch to get something to build (just on my machine ; it's very WIP).
The example code from Sol does work:
sol::state lua;
int x = 0;
lua.set_function("beep", [&x]{ ++x; });
lua.script("beep()");
assert(x == 1);
I'll look into how to integrate LuaJIT, apparently it's not so hard to call an external makefile from within the .pro. Then, it would be a static lib to use.
Then of course, the big part will be what/where/how to bind Qt (+ core) methods properly.
from cemu.
As one can see in the with_lua branch, I've started binding just a few things to try it out, and it seems to work okay so far:
from cemu.
Let's just close that in favor of #252.
Reopen if needed...
from cemu.
Related Issues (20)
- CEmu not receiving Apps. HOT 1
- Add tabs for opcode/operand separation
- CEmu seemingly does not transfer 8xv file HOT 1
- Allow CEmu to be pushed to the back of the screen instead of leaving it in the front. HOT 2
- Variables that start with `r` show up as `Ans` in the Variable Viewer HOT 1
- Doesn't work on big-endian architectures HOT 4
- Exporting "Natural" Key binding causes a crash HOT 1
- Name of AUR in ArchLinux
- Dark mode does not work on macOS HOT 8
- Python app isn't working HOT 3
- Cant send Flash Apps to calc HOT 2
- Emulator doesn't start, missing DLL HOT 3
- Sending .8ek files not working on Mac OS HOT 1
- Fullscreen CLI flag doesn't work HOT 3
- Box whisker plot with outliers is not drawn correctly HOT 2
- Option to disable keyboard inputs HOT 4
- Keypress emulation is not thread-safe
- Building using CMAKE HOT 4
- Extra font characters added to formula list names
- Dark mode ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cemu.