Multithreading Super Mario Bros. on an NES Emulator: A Surprisingly Simple Feat

The author implemented multithreading in Super Mario Bros. on an NES emulator (FCEUX) using a Lua plugin, without modifying the emulator's core code. By leveraging the emulator's save state functionality, different game states were treated as separate threads. Synchronization primitives like mutexes and condition variables were implemented using specific in-game areas, allowing users to interact with threading concepts directly. For example, multiple Mario instances can play concurrently, but only one can enter a pipe at a time. This project demonstrates not only creativity but also provides a clear and engaging explanation of multithreading, highlighting the importance of understanding fundamental computer science concepts.