This project contains hardware schematics and software for building a device that is able to decode and encode the SNES controller protocol on the fly.
Features:
- Play back replay files converted from external sources (most notably TAS runs generated via
lsnes!) - Save stream of pressed buttons into a replay file (so you can use it to record your own playing sessions)
- Play back replay files saved this way
Hardware is based on the Arduino Uno in combination with some simple electronic parts.
The Arduino code is located in the folder arduino_code. The project is based on platformio and was developed for the Arduino Uno (although most other models should also work).
The client code is located in the folder client_code. The project is based on C# / .NET / Microsoft Visual Studio.
- A summary of resources I used for this project can be found in resources
- Hardware schematics (based on Eagle) can be found in schematics
- Some logic captures that help to illustrate the SNES controller protocol (based on Saleae Logic) can be found in compatibility_tests/logic_captures
- For most consistent results, shut down the console and prepare the client load (
l) or save (s) mode - Then power on console, this ensures inputs are synced with the first button poll
- Most desyncs occur directly after powering on because of the nature of initial idle frames, so if an early desync becomes apparent just try again
- Later desyncs should only happen very rarely because of random bitflips caused by electromagnetic interference
- On modded consoles, make sure to use correct clock setting (set SNES to
60HzforNTSCcarts,50HzforPALones)- Using native consoles for specific replays might be even better (even though I successfully replayed
NTSCTASes on aPALconsole modded to60Hz)
- Using native consoles for specific replays might be even better (even though I successfully replayed
- Initial state matters (e.g. no saved game in Super Mario World)
- Super Mario World
- works - verified several converted TAS movies (see dump_scripts/lsnes/dumps/Super Mario World (U) - NTSC)
- The Legend of Zelda - A Link to the Past
- does not work - uses true RNG via horizontal pixel counter
MIT, see LICENSE file.
