import os from loader import Client # Hatari documentation: http://hg.tuxfamily.org/mercurialroot/hatari/hatari/raw-file/tip/doc/manual.html # # Config file entry to provide filename to save on exit: # # [Memory] # nMemorySize = 1 # bAutoSave = TRUE # szMemoryCaptureFileName = /path/to/save/game.hatari # szAutoSaveFileName = /path/to/save/game.hatari # # start using: hatari -c /path/to/config.cfg # # Info on saving state on exit using F12 key: http://www.atari-forum.com/viewtopic.php?f=51&t=22422 # # "changed all [ShortcutsWithoutModifiers] in the cfg to 0 exept KeyQuit. # Changed it to "keyQuit = 293" F12 is quit and you need the alt tab to go to # other options." class HatariClient(Client): pass Client.register("hatari", HatariClient)
opts.extend(["-sid", str(id)]) def resume_opts(self, opts, last_pos): # Some fuzziness in mplayer when restarting (perhaps can only start on # I-frame?) so subtract some time and start from there. last_pos -= 10 if last_pos > 0: opts.extend(["-ss", str(last_pos)]) def play_slave(self, path, opts): last_pos = 0 print ("Playing: %s %s" % (path, str(opts))) try: mp = MPlayer(path, *opts) while mp._is_running(): try: last_pos = mp._get_current_pos() except: # don't reset the last good value on an exception pass time.sleep(1) except: print ("Couldn't start movie!") raise finally: mp.quit() return last_pos Client.register("mplayer", MPlayerClient)
import os from loader import Client class Atari800Client(Client): pass Client.register("atari800", Atari800Client)