Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blog:retrogaming [2023/12/02 18:08] – [XBox 360 Controller] johnblog:retrogaming [2023/12/04 19:54] (current) – [Disable swap] john
Line 48: Line 48:
 <code> <code>
 sudo swapoff -a sudo swapoff -a
 +sudo systemctl disable swapfile.swap
 sudo systemctl disable swap.target sudo systemctl disable swap.target
 </code> </code>
Line 99: Line 100:
   - Click 'Add'   - Click 'Add'
   - Name is 'EmulationStation Desktop Edition'   - Name is 'EmulationStation Desktop Edition'
-  - Command is (click 'Browse', then navigate to your 'bin' folder and the 'emulationstation' file, downloaded above)+  - Command is: <code>/home/user/bin/emulationstation</code> 
   - Comment 'Starts ES DE'   - Comment 'Starts ES DE'
  
Line 138: Line 139:
 mkdir .mame/ mkdir .mame/
 cd src/mame cd src/mame
-cp -a artwork ~user/bin/mame-data +cp -a artwork /path/to/your/mame/artwork/directory 
-cp -a bgfx ~user/bin/mame-data+cp -a bgfx /user/bin/mame-data
 </code> </code>
  
Line 157: Line 158:
 rompath /path/to/your/mame/roms/directory rompath /path/to/your/mame/roms/directory
 samples /path/to/your/mame/samples/directory samples /path/to/your/mame/samples/directory
-artwork /home/user/bin/mame-data/artwork+artwork /path/to/your/mame/artwork/directory
 bgfx    /home/user/bin/mame-data/bgfx bgfx    /home/user/bin/mame-data/bgfx
 +skip_gameinfo 1
 video   bgfx video   bgfx
 window  0 window  0
Line 206: Line 208:
 <code> <code>
 video.fs 1 video.fs 1
 +
 +# PC-Engine
 pce.scanlines 25 pce.scanlines 25
 +pce.shader none
 +pce.special nn2x
 +pce.stretch aspect
 +
 +# Megadrive
 md.scanlines 25 md.scanlines 25
 +md.shader none
 +md.special nn2x
 +md.stretch aspect
 +
 +# SNES
 snes.scanlines 25 snes.scanlines 25
 +snes.shader goat
 +snes.special nn2x
 +snes.stretch aspect
 +
 +# Saturn
 +ss.special none
 +ss.shader goat
 ss.scanlines 25 ss.scanlines 25
 +ss.strech aspect
 </code> </code>
  
-There are optional OpenGL shader effects available, as [[https://mednafen.github.io/documentation/|described in the Mednafen documentation]], but my personal preference is no shaders and just basic scanlines, or it starts to look a little artificial.+There are optional OpenGL shader effects available, as [[https://mednafen.github.io/documentation/|described in the Mednafen documentation]], but my personal preference for the PC-Engine is no shaders and just basic scanlines, or it starts to look a little artificial. On later systems the 'goat' shader can look quite nice.
 ==== Redream ==== ==== Redream ====
  
Line 256: Line 278:
  
 Ensure that your //fullwidth// and //fullheight// options are the same as your display. Obviously your //region// and //broadcast// settings should match the region of the games you wish to play (though in //vga// mode, it mostly doesn't matter). Ensure that your //fullwidth// and //fullheight// options are the same as your display. Obviously your //region// and //broadcast// settings should match the region of the games you wish to play (though in //vga// mode, it mostly doesn't matter).
 +
 +If you are using a 360 controller and want the Guide button to work as a quit key, then whilst playing Redream:
 +
 +Press Escape to bring up the Redream menu and select Input from the top menu:
 +
 +{{:blog:redream-1.jpg?300|}}
 +
 +Click on your 360 controller in Port A and move the cursor down to the 'Exit' function, click on it (it will change to 'Waiting'):
 +
 +{{:blog:redream-2.jpg?300|}}
 +
 +Now press the Guide button (joy8, according to Redream):
 +
 +{{:blog:redream-3.jpg?300|}}
 +
 +Exit Redream to save the new config. The Guide button on the controller will then quit the game from that point onwards.
  
 ===== XBox 360 Controller ===== ===== XBox 360 Controller =====
  
-The typical Xbox 360 controller works fine out of the box on most Linux systems, but we can make better use of it by mapping the normally unused Guide button to the escape key on the keyboard - which most emulators use as a 'quit' option. This means that in 99% of situations, we never even need a keyboard.+The typical Xbox 360 controller works fine out of the box on most Linux systems, but we can make better use of it by mapping the normally unused Guide button to the escape key on the keyboard - which most emulators use as a 'quit' option. This means that in 99% of situations, we never even need a keyboard. We've seen that we can remap it directly in Redream, but a lot of emulators just use Escape as the quit key, so if we can get it to replicate that behaviour, then we don't need to remap it in most use cases.
  
-The [[https://github.com/AntiMicroX/antimicrox|AntiMicroX utility]] can map USB controller inputs to arbitrary keyboard codes, so we will use that to turn the central Xbox Guide button to an escape key.+Fortunately the [[https://github.com/AntiMicroX/antimicrox|AntiMicroX utility]] can map USB controller inputs to arbitrary keyboard codes, so we will use that to turn the central Xbox Guide button to an escape key.
  
 First install the requirements to build it: First install the requirements to build it:
Line 283: Line 321:
 </code> </code>
  
-Start up antimicrox whilst you have your controller plugged in.+Start up antimicrox (run **bin/antimicrox** from a terminal) whilst you have your controller plugged in. 
 + 
 +Scroll down to the Guide button, click it: 
 + 
 +{{:blog:antimicrox-1.jpg?300|}} 
 + 
 +... and then select the Esc key on the virtual keyboard that pops up: 
 + 
 +{{:blog:antimicrox-2.jpg?300|}} 
 + 
 +Now, select the //Options// menu, click the //Settings// entry, set the  the 'close to tray', 'minimize to taskbar', 'autoload last profile' and 'launch in tray' checkboxes: 
 + 
 +{{:blog:antimicrox-3.jpg?300|}} 
 + 
 +Save your profile (I called it 'xpad-settings' in my user home directory) and then add antimicrox to your startup applications list: 
 + 
 +  * Name: Antimicrox 
 +  * Command: <code>/home/user/bin/antimicrox --profile /home/user/xpad-settings.gamecontroller.amgp</code> 
 +  * Comment: Game controller keyboard mapping 
 + 
 +Once configured, antimicrox will always start minimised, so you may want to create a desktop shortcut to start the utility again. Here's the content of a desktop shortcut which will do just that: 
 + 
 +<code> 
 +[Desktop Entry] 
 +Name=AntiMicroX 
 +Exec=/home/user/bin/antimicrox --show 
 +Comment= 
 +Terminal=false 
 +Icon= 
 +Type=Application 
 +</code>
  
-Scroll down to the Guide button, click itand then select the Esc key on the virtual keyboard that pops up. Now, in preferences, tick the 'close to tray' and 'minimize' options.+Create it as **AntiMicroX.desktop** on your desktop with a text editor and set it to be executable.
  
-Save your profile and then add antimicrox to your startup applications list:+Once you have logged out and back in again, the antimicrox tool will launch in the background to the system tray, EmulationStation DE will launch, and any time you start MAME, Mednafen or any other emulator which treats the Escape key as 'quit', pressing the Guide button on the 360 controller will exit the game for you.
  • blog/retrogaming.1701540523.txt.gz
  • Last modified: 2023/12/02 18:08
  • by john