Getting started
Load core
Load game
...
Run core
Input
from retropy import Device, Joypad, Analog
...
player = 0
core.controller[player].set_state(Device.JOYPAD, 0, Joypad.A, 1)
core.controller[player].set_state(Device.ANALOG, Analog.LEFT_STICK, Analog.X, 0x9FFF)
Savestates
from retropy.utils.savestate import Savestate
...
save = core.save_state() # create a savestate
save.write("./save.svt") # write savestate to file
core.reset() # reset core
del save # delete savestate for demonstrational purposes
save = Savestate().load("save.svt") # load savestate from file
core.load_state(save) # load previous savestate