- Setup Debian64 12 on your AMD64 architecture computer.
- During “Software selection” (tasksel) in Debian64 12 setup, I ticked “Debian desktop environment,” “Xfce,” and “standard system utilities.”
-
After completing setup, proceed to update your installation:
su -c "vi /etc/apt/sources.list" # Comment out "deb cd-rom:..." su -c "apt-get update" su -c "apt-get upgrade"
-
Install MAME and Mednafen:
su -c "apt-get install mame mednafen"
-
Make a "mame/roms" directory in your user's home directory. Copy your mame roms to that directory.
- Make a directory in your home directory for your Mednafen roms. I made a "mednafen/roms" directory in my home directory for this.
-
Install xboxdrv if mame reports your controller as “Xbox 360 Controller”:
su -c "apt-get install xboxdrv python3-usb"
-
Make a "/usr/bin/fixcontroller.py" script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/usr/bin/env python3 import os import sys try: import usb.core import usb.util except ImportError: print("First, install the pyusb module with PIP or your package manager.") else: if os.geteuid() != 0: print("You need to run this script with sudo") sys.exit() dev = usb.core.find(find_all=True) for d in dev: if d.idVendor == 0x045e and d.idProduct == 0x028e: d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) finally: sys.exit()
-
Execute the following:
su -c "chmod 755 /usr/bin/fixcontroller.py" su -c "/usr/bin/fixcontroller.py" # You need to execute this command before starting MAME or Mednafen.
-
Connect your controller. Then reboot.
- Run mame. Under "General Settings" -> "Advanced Options" -> "Input Options", turn off "Coin lockout".
- Under "General Settings" -> "Input Assignments", make sure that start and select buttons are configured properly in your controllers. Also, make sure that "Start" and "Coin" are configured properly under "Other Controls" for your controller.
- Exit mame and proceed to configure mednafen. Go to "Global Settings" -> "Sound". Set "Device" to "sexyal-literal-default"". Under "Global Settings" -> "Video", you might want to tick "Enable fullscreen". Run a game and then press Alt-Shift-1 to configure your first controller.