This Python script allows you to control an emulator using commands typed in Twitch TV Chat. You can define which buttons on the emulator's controller correspond to which chat commands using the controller_profiles.yaml
file, and you can specify which Twitch users have moderator privileges to control the emulator using the mods.yaml
file.
- Python 3.x
- Twitch API credentials
- Emulator software
- Clone or download this repository to your local machine.
- Install the required Python packages by running
pip install -r requirements.txt
. - Edit the
mods.yaml
file to specify the Twitch usernames of the users who have moderator privileges over the emulator. - Edit the
controller_profiles.yaml
file to define the mapping between chat commands and emulator controller buttons. - Set up your Twitch API credentials in
twitch.yaml
. - Edit
main.py
with your Emulator run command. For example (line 16 of main.py):emulator_command = "./PSX/EmuHawk.exe --load-state=./PSX/PSX/State/1.State ./PSX/FinalFantasyTactics.cue"
- Edit
main.py
with your prefered console setting (matching controller_profiles.yaml). For example on line 12:console = 'PSX'
- Run the script by typing
python main.py
. - In your Twitch chat, type one of the chat commands defined in the
controller_profiles.yaml
file to control the emulator.
This file contains a list of Twitch usernames who have moderator privileges to control the emulator's load/save states. Add or remove usernames as needed.
This file contains your Twitch TV API credentials and channel name that this chat bot will be applied to, it's best to use separate account to your Twitch account for this as it is considered a bot.
This file contains chat mappings for actions that will be called upon the emulator. The file currently has bindings for PSX. This is set in main.py
on line 12 console = 'PSX'