C++ Wrapper for Scripting API - Printable Version +- mGBA Forums (https://forums.mgba.io) +-- Forum: mGBA (https://forums.mgba.io/forumdisplay.php?fid=1) +--- Forum: Development (https://forums.mgba.io/forumdisplay.php?fid=11) +--- Thread: C++ Wrapper for Scripting API (/showthread.php?tid=5615) |
C++ Wrapper for Scripting API - cragson - 08-13-2023 Hi, I don't know if this is the proper place to open this thread but I don't have access to any other dev related sections. I programmed a little Wrapper for the Scripting API, which is written in C++ and could easily be ported to other languages like e.g. python. With this Wrapper you can execute functions like e.g. reading or writing to memory, retrieve game code or title and sending key presses. The wrapper works by setting up a TCP server on the C++ application and a TCP client with a LUA file on the emulator. Afterwards commands are sent from the server to the client and parsed in LUA and results are sent back. I did it because it was a cool experiment for myself and also because I wanted to do external cheat's for some GBA games. Also I chose to not read/write directly into the emulators process memory, so it could support more version's of mGBA (dependend of the script api and not e.g. byte signatures etc.) This was pretty fun to me and I hope this could also be somewhat useful to you guys. Everything is open-source and for you to access right away. Also I'm quite busy but if I find any time to work on this in the future, I'll be more than happy to extend the current feature set and make it more stable. Please be aware that this project was coded in 3-4 hours and I never messed with mGBA nor Lua before that. https://github.com/cragson/mgba-api Also I did already a small cheat for Pokemon Mystery Dungeon Red Rescue Team, which can be found here: https://github.com/cragson/pkm-md-red I'm always open for any kind of constructive feedback! Regards, cragson |