Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.59 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.59 KB

Fceux_luaserver

Fceux lua socket server and Jupyter Python client

This is proof-of-concept of remote controlling of Fceux NES emulator with Python via sockets. I use Jupyter Notebook as interactive python environment for controlling emulator. This is also good environment for running examples.

For checking example:

  1. You must have working Python 3 and Jupyter Notebook. Run jupyter with command:
jupyter notebook
  1. Open FceuxPythonServer.py.ipynb notebook and run first cell: jupyter_1

  2. Now you must run fceux emulator with ROM (I used Castlevania (U) (PRG0) [!].nes for my examples) Next, start lua script fceux_listener.lua. It must connect to running jupyter python server. I run emulator, load ROM to it and start lua script with command:

fceux.exe -lua fceux_listener.lua "Castlevania (U) (PRG0) [!].nes"
  1. Now go back to Jupyter Notebook and you must see message about successfull connection: jupyter_2

You are able to send commands from Jupyter to Fceux (you can execute Notebook cells one by one and see results). Additionally, I recommend to install some software to pin fceux window on top, so you can see command results in emulator window immediatly. For example, it can be done with Dexpot.

Video with results: https://www.youtube.com/watch?v=c3D5gljbkO0