How to Play NES/FDS Games on Fedora 38

by Wish-Lin in Circuits > Software

488 Views, 1 Favorites, 0 Comments

How to Play NES/FDS Games on Fedora 38

title.png

Whether you find a new interest in speedrunning retro Mario games, or just wanting to relive the good old days, a NES Emulator is all you need to run your favorite childhood memories right on your computer. However, if you are a Fedora user like myself, chances are you may find that most tutorials on setting up NES emulators are for Windows users, the rest of them mainly focuses on Ubuntu, and that a myriad of issues arise when the Ubuntu procedure is applied to Fedora.

This instructable details the process of settings up a NES Emulator for running NES/FDS games on Fedora 38, as well as the many problems one may run into during the installation(as in my case).

Install Nestopia UE

nestopia-blank.png

The first question is which NES emulator should you install? Well, let's see what the Super Mario Bros. Speedrun community suggests. These emulators are exact replicas of the actual NES/Famicom console (hence their qualification for speedrunning), so these emulators would be your top choice. The most popular ones used by Linux users seems to be FCEUX and Nestopia UE, and this is where the first problem comes in.

As of today(2023/06/18), FCEUX cannot run reliably on Fedora 38. I don't know the reason behind this, but me and many other people on the internet had experienced the issue. For simplicity's sake, if you are not making TAS(which you probably aren't), just go with Nestopia UE.

First, install RPM Fusion(free). This is the repository that contains Nestopia UE.

sudo dnf upgrade --refresh 
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

Next, install Nestopia UE:

sudo dnf install Nestopia

Start Nestopia and you should see a blank black screen like the image above.

Configuration

nestopia-keymap.png
nestopia-keymap-windows.png

Now that you have successfully installed Nestopia UE, the next step is to familiarize yourself with its controls and shortcuts. This is another part where you can easily find info for Windows but not Linux.

  • Map keys: Go to Emulator -> Configuration -> Input, click on the button on screen then press the key you want it to map to. Beware that the UI interface is quite different from the Windows version(Windows screenshot credit: here).
  • Window size(when not in full screen): Go to Emulator -> Configuration -> Video. You can choose from 1x to 8x.
  • Shortcuts:
  • F5: Save savestate
  • F7: Load savestate
  • F9: Take screenshot and save to ~/.local/share/nestopia/screenshots
  • F12: Restart game (Don't use Soft/Hard Reset option from menubar as they sometimes crash Nestopia for whatever reason)
  • F: Toggle fullscreen (this one took me a while to find, also different from Windows)
  • Alt+F4: Quit

Load ROM and Play!

nestopia-running-smb1.png

Now that Nestopia is all set up, it's time to actually play some games. For that, you'll need the ROM file of that game, which is the equivalent of the cartridge that you plug into the real console. You can find them online after a quick Google search.

For example, the original, unaltered ROM of the famous Super Mario Bros. can be found here (MD5: 811b027eaf99c2def7b933c5208636de). Unzip and click on the .nes file, and you should be good to go!

If you prefer using an external USB NES controller, you'll need to plug it in BEFORE you startup the game, and go to Emulator -> Configuration -> Input -> Input Device and select Joystick. Map the buttons like above.

Note that all ROM files in this case should have a file extension of either .nes or .fds. If you see .exe, it's 100% malware. I know exe files can't run on Linux but if you are a Windows user, beware.

Extra: How to Load FDS ROM

nestopia-cant-find-fds-bios.png
nestopia-folder.png
nestopia-fds-loading.png

If you don't know what FDS is, here is a fantastic video explaining it. Basiclly, FDS(Famicom Disk System) is an add-on of Famicom, which is basiclly the Japanese version of NES. Nestopia can run FDS games, but it requires an additional FDS BIOS.

First, start Nestopia from the command line using the command nestopia. You should see a line that says

Fds: BIOS not found: <path>/disksys.rom

Open that path, and you should see something like the second image above (Might have more or less subdirectories depending on whether you used these features in Nestopia before).

Now, download the FDS BIOS from here, change its name to disksys.rom (case sensitive!), and place it in the directory alongside those subdirectories, and you are done! Now if you run the nestopia command again, you should see

Fds: BIOS ROM ok

And if you open a .fds file(make sure to set it to be opened by Nestopia!!), you should see the FDS loading screen (third image above) and the game would start shortly after.

Original, Unaltered FDS ROM of Super Mario Bros.: The Lost Levels (SMB2J) can be found here (MD5: 7f38210a8a2befb8d347523b4ff6ae7c). This can be used to test the FDS setup. The game is really fun too and if you are a fan of the original Super Mario Bros. then you should definitely check it out.

Conclusion

And that's about it. I hope this instructable can help other Fedora users(and every retro game lover in general) easily play retro NES games right on their laptop/PC. If you encounter anymore issues, please comment below!