I now have the newest WIP ready.
I thought the feature described
here was rather cute, so the main new feature here is a Python scripting interface. Currently you can frame advance and inspect/change RAM using the interface, but I also plan to add state loading/saving and movie record/playback capabilities.
The Python interface can either be used in standalone mode where the emulator is loaded as a Python module, or in embedded mode where scripts are loaded from within the emulator and have access to the current emulator state.
For the interface to work you will need
Python 2.4 installed, else the Python menu option will be unavailable.
Example of how to use the interface:
from pydega import *
XPOS = 100 # we want to get to this X position
dega.input[0] = BTN_RIGHT # joypad right
while dega.ram[1234] < XPOS: # read ram address 1234 (note: dega.ram[0] corresponds to $C000)
dega.frame_advance()
dega.input[0] = 0 # joypad neutral
As an example Python script I have included a memory watcher/trainer tool. The user interface is a bit rough at the moment and includes the following caveats:
- you cannot perform most emulator actions while a script is running c.f. the memory watcher/trainer is open, instead you can use the buttons provided on the tool itself. You can however use the keyboard to control the game (make sure the dega window has focus) while the trainer is in "Run" mode
- no sound while the trainer is open
- game might run slowly while trainer is open because frameskip is disabled
Most of these stem from the fact that the script 'drives' the emulator while it is running. I'm thinking about ways around this problem.
Source code:
http://www.doc.ic.ac.uk/~pcc03/dega/wip/dega-1.14-wip20070717.tar.gz
Win32 binary:
http://www.doc.ic.ac.uk/~pcc03/dega/wip/dega-1.14-wip20070717-win32.zip