### Example Package Installation Command Source: https://wiki.batocera.org/create_pacman_package Specific command to install the example package created earlier, using its full path. ```bash pacman -U /userdata/system/package/nes-alter-ego-1.0.0-1-any.pkg.tar.zst ``` -------------------------------- ### Bluetooth pairing output example Source: https://wiki.batocera.org/bluetooth_controllers_-_manual_setup Example output when running the trust-pad command. ```bash [root@RPI3-BATOCERA /userdata/system]# batocera-bluetooth trust-pad Pairing 8BitDo M30 gamepad... Trusting 8BitDo M30 gamepad... [root@RPI3-BATOCERA /userdata/system]# ``` -------------------------------- ### Full syslinux.cfg Example Source: https://wiki.batocera.org/batocera-and-crt A complete example of a syslinux.cfg file configured for a CRT display. ```text UI menu.c32 TIMEOUT 50 TOTALTIMEOUT 300 SAY Booting Batocera.linux... MENU CLEAR MENU TITLE Batocera.linux MENU SHIFTKEY LABEL batocera MENU LABEL Batocera.linux (^normal) MENU DEFAULT LINUX /boot/linux APPEND label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 mitigations=off video=DVI-I-1:640x480ieS INITRD /boot/initrd.gz LABEL verbose MENU LABEL Batocera.linux (^verbose) LINUX /boot/linux APPEND label=BATOCERA vt.global_cursor_default=0 INITRD /boot/initrd.gz ``` -------------------------------- ### Install Docker on Solus Source: https://wiki.batocera.org/compile_batocera.linux Command to install git, docker, and make on Solus Linux. ```bash sudo eopkg install –y git docker make ``` -------------------------------- ### Install bpytop on Batocera v33 and earlier Source: https://wiki.batocera.org/access_the_batocera_via_ssh Manual installation steps for the bpytop resource monitor on older Batocera versions. ```bash python -m ensurepip --upgrade pip3 install bpytop --upgrade batocera-save-overlay ``` -------------------------------- ### Setup Power Switch via GUI Menu Source: https://wiki.batocera.org/add_powerdevices_rpi_only Access a terminal and run the `/etc/init.d/S92switch setup` command to open a menu for selecting and activating your power switch device. The script will indicate the currently active device and confirm successful setup. ```bash /etc/init.d/S92switch setup ``` -------------------------------- ### Example bluetoothctl Output - Scanning Source: https://wiki.batocera.org/bluetooth_controllers_-_manual_setup This output shows the initial steps of enabling Bluetooth services and starting a scan, indicating a controller is detected. ```bash [root@BATOCERA /userdata/system]# bluetoothctl Agent registered [bluetooth]# agent on Agent is already registered [bluetooth]# default-agent Default agent request successful [bluetooth]# power on Changing power on succeeded [bluetooth]# scan on Discovery started [CHG] Controller 43:45:C0:00:1F:AC Discovering: yes [NEW] Device E4:17:D8:C2:0B:0E 8BitDo M30 Modkit ``` -------------------------------- ### List Disks for Batocera Installation Source: https://wiki.batocera.org/access_the_batocera_via_ssh Use `batocera-install listDisks` to see available disks where Batocera can be installed. This command is also accessible through the 'Install Batocera on a new disk' option in EmulationStation. ```bash batocera-install listDisks ``` -------------------------------- ### Install Git on Fedora Source: https://wiki.batocera.org/contributing-to-batocera Use this command to install Git on Fedora. ```bash dnf install git ``` -------------------------------- ### Global RetroArch Setting Example Source: https://wiki.batocera.org/batocera_conf_syntax Example of enabling hard sync for RetroArch globally. ```text global.retroarch.video_hard_sync=true ``` -------------------------------- ### Example Boot Line with USB Quirk Source: https://wiki.batocera.org/diy-arcade-controls This shows an example of how the USB quirk should be appended to the existing boot line in the boot configuration file. ```bash APPEND=label=BATOCERA rootwait quiet loglevel=0 console=ttyAML0,115200n8 console=tty3 vt.global_cursor_default=0 usbhid.quirks=0×0079:0×0006:0×040 ``` -------------------------------- ### Example File Structure for Multi-Track BIN/CUE Source: https://wiki.batocera.org/cd_image_formats This example illustrates a typical file structure for a game that uses multiple BIN files for different tracks and a CUE sheet to define their organization. The CUE file is essential for emulators to correctly load all data, including audio. ```text Rockman 8 - Metal Heroes (Japan) (Track 1).bin Rockman 8 - Metal Heroes (Japan) (Track 2).bin Rockman 8 - Metal Heroes (Japan) (Track 3).bin Rockman 8 - Metal Heroes (Japan) (Track 4).bin Rockman 8 - Metal Heroes (Japan).cue ``` -------------------------------- ### Example xrandr command for custom script Source: https://wiki.batocera.org/display_issues A concrete example of the xrandr command used to set output, mode, and rate. ```bash xrandr --output HDMI-0 --mode 1920x1080 --rate 60 ``` -------------------------------- ### List Installation Files Source: https://wiki.batocera.org/access_the_batocera_via_ssh The `batocera-install listFiles` command shows all files available in the `/userdata/system/installs` directory, which can be used for manual installations. ```bash batocera-install listFiles ``` -------------------------------- ### Start Kodi Media Center with batocera-es-swissknife Source: https://wiki.batocera.org/access_the_batocera_via_ssh The --kodi flag will stop EmulationStation and start the Kodi Media Center. Use this to switch to a media center environment from the gaming interface. ```bash batocera-es-swissknife --kodi ``` -------------------------------- ### Start Screen Recording Source: https://wiki.batocera.org/access_the_batocera_via_ssh Starts recording the screen. Press [Ctrl]+[C] to stop the recording. ```bash batocera-record ``` -------------------------------- ### Install .NET 7 Source: https://wiki.batocera.org/disk_image_compression Installs the .NET 7 runtime required by PSXPackager on Debian-based Linux systems. ```bash sudo apt install dotnet7 ``` -------------------------------- ### System-Specific RetroArch Setting Example Source: https://wiki.batocera.org/batocera_conf_syntax Example of enabling hard sync specifically for the Saturn system. ```text saturn.retroarch.video_hard_sync=true ``` -------------------------------- ### Install Git on Arch Linux Source: https://wiki.batocera.org/contributing-to-batocera Use this command to install Git on Arch Linux. ```bash pacman -S git ``` -------------------------------- ### Configure syslinux.cfg for CRT Boot Source: https://wiki.batocera.org/batocera-and-crt?do=edit Example configuration for the syslinux.cfg file to set boot-time video output parameters. ```text UI menu.c32 TIMEOUT 50 TOTALTIMEOUT 300 SAY Booting Batocera.linux... MENU CLEAR MENU TITLE Batocera.linux MENU SHIFTKEY LABEL batocera MENU LABEL Batocera.linux (^normal) MENU DEFAULT LINUX /boot/linux APPEND label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 mitigations=off video=DVI-I-1:640x480ieS INITRD /boot/initrd.gz LABEL verbose MENU LABEL Batocera.linux (^verbose) LINUX /boot/linux APPEND label=BATOCERA vt.global_cursor_default=0 INITRD /boot/initrd.gz ``` -------------------------------- ### Initialize Bluetoothctl Source: https://wiki.batocera.org/bluetooth_controllers_-_manual_setup Turn on the Bluetooth agent, set it as default, power on the adapter, and start scanning for devices. ```bash agent on default-agent power on scan on ``` -------------------------------- ### Install Docker on Arch Linux Source: https://wiki.batocera.org/compile_batocera.linux Command to install the docker package using pacman. ```bash sudo pacman -S docker ``` -------------------------------- ### Launch Openbox Source: https://wiki.batocera.org/batocera-and-crt Starts the Openbox window manager with the specified configuration file and EmulationStation. ```bash openbox --config-file /etc/openbox/rc.xml --startup "emulationstation-standalone" ``` -------------------------------- ### Dolphin Emulator Configuration Example Source: https://wiki.batocera.org/coding_rules An example of defining features and custom features for the Dolphin emulator, including graphics backend and performance hack options with choices. ```yaml dolphin: features: [ratio] cfeatures: gfxbackend: archs_include: [x86, x86_64, rpi4, odroidgoa, gameforce] prompt: GRAPHICS BACKEND description: Choose your graphics rendering choices: "OpenGL": OGL "Vulkan": Vulkan perf_hacks: group: ADVANCED OPTIONS prompt: PERFORMANCE HACKS description: Increase emulator performance, at the cost of accuracy/stability choices: "Off": 0 "On": 1 systems: wii: cfeatures: emulatedwiimotes: group: ADVANCED OPTIONS prompt: EMULATE WIIMOTE description: Use your gamepad like a vertical Wiimote in game choices: "Off": 0 "On": 1 ``` -------------------------------- ### Install Batocera on a Disk Source: https://wiki.batocera.org/access_the_batocera_via_ssh Use `batocera-install install ` to install the latest stable Batocera version or a specified file onto a target disk. Warning: This command erases all existing data on the disk. Local files must be in `/userdata/system/installs`. ```bash batocera-install install ``` -------------------------------- ### Example aplay -l Output Source: https://wiki.batocera.org/audio_issues Example output from the `aplay -l` command, showing different audio hardware devices and their corresponding card and device indices. This helps in determining the correct configuration for `.asoundrc`. ```text **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC255 Analog [ALC255 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4] Subdevices: 1/1 Subdevice #0: subdevice #0 ``` -------------------------------- ### Multi-line Description Example Source: https://wiki.batocera.org/coding_rules Demonstrates how to use multi-line descriptions for complex options by prepending '|-' to the description field. ```yaml prompt: HEADS UP DISPLAY description: |- Show context-sensitive info over the game and a 3rd line and a 4th line. submenu: DECORATIONS ``` -------------------------------- ### Download build sources Source: https://wiki.batocera.org/compile_batocera.linux Pre-fetches necessary source files for the specified architecture before starting the compilation process. ```Makefile make x86_64-source ``` -------------------------------- ### Start Docker Service Source: https://wiki.batocera.org/compile_batocera.linux This command starts the Docker service. Ensure Docker is running before proceeding with build tasks. A reboot is recommended to confirm the service is active. ```bash sudo systemctl start docker.service ``` -------------------------------- ### View package removal output Source: https://wiki.batocera.org/create_pacman_package Example output displayed when running the package removal command. ```text checking dependencies... Packages (1) nes-alter-ego-1.0.0-1 Total Removed Size: 1.33 MiB :: Do you want to remove these packages? [Y/n] ``` -------------------------------- ### Configure Dotclock Minimum Source: https://wiki.batocera.org/batocera-and-crt Example configuration setting for the dotclock minimum in the switchres.ini file. ```ini dotclock_min 0 (Default) 0-25 with decimal support 1.1, 8.3, 10.5 and so on ``` -------------------------------- ### Batocera Package Creation Output Source: https://wiki.batocera.org/create_pacman_package Example output from the batocera-makepkg command, showing the package creation process and success message. ```text Creating package ../nes-alter-ego-1.0.0-1-any.pkg.tar.zst ... /*stdin*\ : 45.08% ( 46592 => 21005 bytes, ../nes-alter-ego-1.0.0-1-any.pkg.tar.zst) SUCCESS: package ../nes-alter-ego-1.0.0-1-any.pkg.tar.zst correctly generated ``` -------------------------------- ### Sync Package to Live Device Source: https://wiki.batocera.org/batocera.linux_buildroot_modifications Transfer compiled package files to a live Batocera installation via rsync. ```bash rsync -av output/bcm2837/target/ root@batocera.local:/ ``` -------------------------------- ### Add PPA and Install Git on Debian-based Linux Source: https://wiki.batocera.org/contributing-to-batocera Add a PPA to get a more recent version of Git on Ubuntu and other Debian-based distributions, then update and install. ```bash add-apt-repository ppa:git-core/ppa apt update; apt install git ``` -------------------------------- ### Define controller mapping in YAML Source: https://wiki.batocera.org/diy-arcade-controls Example YAML configuration for a 2-player controller setup, defining virtual joysticks and hotkey mappings. ```yaml # Xtension 2 Player Plus target_devices: - name: Xtension 2P Player 1 type: joystick mapping: "key:up": "abs:hat0y:-1" "key:down": "abs:hat0y:1" "key:left": "abs:hat0x:-1" "key:right": "abs:hat0x:1" "key:leftshift": "btn:south" "key:enter": "btn:south" "key:z": "btn:east" "key:leftctrl": "btn:west" "key:leftalt": "btn:north" "key:space": "btn:tl" "key:x": "btn:tr" "key:c": "btn:start" "key:1": "btn:start" "key:v": "btn:select" "key:5": "btn:select" - name: Xtension 2P Player 2 type: joystick mapping: "key:r": "abs:hat0y:-1" "key:f": "abs:hat0y:1" "key:d": "abs:hat0x:-1" "key:g": "abs:hat0x:1" "key:w": "btn:south" "key:i": "btn:east" "key:a": "btn:west" "key:s": "btn:north" "key:q": "btn:tl" "key:k": "btn:tr" "key:j": "btn:start" "key:2": "btn:start" "key:1": "btn:select" "key:6": "btn:select" - name: Xtension hotkeys type: hotkeys mapping: "key:tab": "key:menu" "key:p": "key:pause" "key:esc": "key:exit" ["key:1", "key:v"]: "key:exit" # exit from combination player 1 select + player 2 select, require batocera 43 ["key:c", "key:space"]: "key:1" # player 2 select from combination player 1 start+tl, require batocera 43 ``` -------------------------------- ### Host a build for network upgrades Source: https://wiki.batocera.org/compile_batocera.linux Starts a local web server on the build machine to serve compiled images for network-based upgrades. ```Makefile make x86_64-webserver ``` -------------------------------- ### Initialize Package Patching Environment Source: https://wiki.batocera.org/batocera.linux_buildroot_modifications Navigate to the build directory and initialize a git repository for tracking changes. ```bash cd output/bcm2837/build/retroarch-version git init ``` -------------------------------- ### Install Git on Debian-based Linux Source: https://wiki.batocera.org/contributing-to-batocera Use this command to install Git on Ubuntu and other Debian-based distributions. ```bash apt-get install git ``` -------------------------------- ### List Available Disks for Formatting Source: https://wiki.batocera.org/access_the_batocera_via_ssh Use `batocera-format listDisks` to see all partitions and disks currently recognized by the system. This is a preliminary step before formatting. ```bash batocera-format listDisks ``` -------------------------------- ### Conditional Execution with Install/Uninstall Sections Source: https://wiki.batocera.org/create_pacman_package Demonstrates using .INSTALL_START/.INSTALL_END and .UNINSTALL_START/.UNINSTALL_END to run commands only during installation/upgrade or uninstallation, respectively. The 'date' command runs regardless. ```bash exec = /bin/bash date .INSTALL_START echo "Installing bezels with glazed effect..." .INSTALL_END .UNINSTALL_START echo "Uninstalling bezels with glazed effect..." .UNINSTALL_END ``` -------------------------------- ### Configure Composite Video Output in cmdline.txt Source: https://wiki.batocera.org/batocera-and-crt-rpi Add this line to the beginning of the cmdline.txt file on the boot partition. ```text video=Composite-1:720x480@60ie ``` -------------------------------- ### Example .info Bezel Configuration Source: https://wiki.batocera.org/decoration A JSON-formatted text file defining the dimensions, margins, opacity, and message positioning for a bezel overlay. ```json { "width":1920, "height":1080, "top":2, "left":241, "bottom":1, "right":243, "opacity":0.7000000, "messagex":0.220000, "messagey":0.120000 } ``` -------------------------------- ### Example Image Embedding Source: https://wiki.batocera.org/blog_writing An example of embedding an image using markdown, including descriptive alt-text and a snarky pop-up comment. ```markdown ![Picture of the Capcom Home Arcade.](https://wiki.batocera.org/_media/hardware:cha-case-front-thumb.png "It's literally a giant Capcom logo.") ``` -------------------------------- ### Install development tools on Linux distributions Source: https://wiki.batocera.org/compile_batocera.linux Commands to install essential build tools required for compiling Batocera.linux on various Linux distributions. ```bash sudo apt-get install build-essential ``` ```bash sudo dnf group info "Development Tools" "Development Libraries" ``` ```bash sudo dnf groupinstall "Development Tools" "Development Libraries" ``` ```bash sudo pacman -S base-devel ``` -------------------------------- ### Installing a Batocera Package Source: https://wiki.batocera.org/create_pacman_package Command to install a created Batocera package using pacman. Replace '' with the actual package file path. ```bash pacman -U ``` -------------------------------- ### Example bluetoothctl Output - Pairing and Connecting Source: https://wiki.batocera.org/bluetooth_controllers_-_manual_setup This output details the process of pairing, connecting, and trusting a Bluetooth controller, including authorization prompts. ```bash [bluetooth]# pair E4:17:D8:C2:0B:0E Attempting to pair with E4:17:D8:C2:0B:0E [CHG] Device E4:17:D8:C2:0B:0E Connected: yes [CHG] Device E4:17:D8:C2:0B:0E Modalias: usb:v2DC8p5101d0100 [CHG] Device E4:17:D8:C2:0B:0E UUIDs: 00001124-0000-1000-8000-00805f9b34fb [CHG] Device E4:17:D8:C2:0B:0E UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device E4:17:D8:C2:0B:0E ServicesResolved: yes [CHG] Device E4:17:D8:C2:0B:0E Paired: yes Pairing successful [bluetooth]# connect E4:17:D8:C2:0B:0E Attempting to connect to E4:17:D8:C2:0B:0E Failed to connect: org.bluez.Error.Failed [CHG] Device E4:17:D8:C2:0B:0E Connected: yes Authorize service (yes/no): yes Authorize service 00001124-0000-1000-8000-00805f9b34fb [8BitDo M30 Modkit]# trust E4:17:D8:C2:0B:0E [CHG] Device E4:17:D8:C2:0B:0E Trusted: yes Changing E4:17:D8:C2:0B:0E trust succeeded ``` -------------------------------- ### Configure Audio Device in batocera.conf Source: https://wiki.batocera.org/audio_issues Manually set the audio device index in `batocera.conf` if EmulationStation lists audio devices differently than Kodi. Use a Unix-respecting editor to avoid corrupting the file. ```shell audio.device=0,4 ``` -------------------------------- ### Global RetroArch Core Option Example Source: https://wiki.batocera.org/batocera_conf_syntax Example of setting a RetroArch core option globally. This applies the setting to all systems unless overridden. ```batocera global.retroarchcore.vice_external_palette=vice ``` -------------------------------- ### Navigate to Source Directory Source: https://wiki.batocera.org/compile_batocera.linux Command to enter the cloned repository directory. ```bash cd batocera.linux ``` -------------------------------- ### Install Pacman Package Source: https://wiki.batocera.org/access_the_batocera_via_ssh The `pacman -S` command installs a specified package from the repositories. Ensure you know the exact package name before running this command. ```bash pacman -S ``` -------------------------------- ### System-Specific RetroArch Core Option Example Source: https://wiki.batocera.org/batocera_conf_syntax Example of setting a RetroArch core option for a specific system. This allows for tailored configurations per system. ```batocera c64.retroarchcore.vice_external_palette=vice ``` -------------------------------- ### Batch Convert All Supported Formats to PBP (Linux/macOS) Source: https://wiki.batocera.org/disk_image_compression Finds all .iso, .cue, and .m3u files recursively and converts them to .pbp format using PSXPackager. ```bash find . -name "*iso" -exec psxpackager -l 9 -i {} -o {}.pbp \; find . -name "*cue" -exec psxpackager -l 9 -i {} -o {}.pbp \; find . -name "*m3u" -exec psxpackager -l 9 -i {} -o {}.pbp \; ``` -------------------------------- ### Embed Image with Size and Alt Text (Table Example) Source: https://wiki.batocera.org/batocera_wiki_code_snippets Embed an image with a specified pixel size and alternative text, as shown in a table example. ```wiki markup {{:switch-button.png?20|On/Off Settings}} ``` -------------------------------- ### Include Generator in setup.py Source: https://wiki.batocera.org/batocera.linux_buildroot_modifications Syntax for registering a generator in the packages list. ```python configgen.generators. ``` -------------------------------- ### Apply and Build Package Source: https://wiki.batocera.org/batocera.linux_buildroot_modifications Commands to verify patch application and complete the package build. ```bash make retroarch-patch # to confirm the patch is applied make retroarch # to finish other steps ``` -------------------------------- ### Enable FKMS Driver Source: https://wiki.batocera.org/add_tft_screen_rpi_only Add this line to `/boot/config.txt` to enable the Firmware KMS driver, often required for specific LCD setups like the PiStation Deluxe. ```config dtoverlay=vc4-fkms-v3d-pi4 ``` -------------------------------- ### Get Current Timezone Source: https://wiki.batocera.org/access_the_batocera_via_ssh Shows the currently configured timezone. ```bash batocera-timezone get ``` -------------------------------- ### Run Frame-Buffer Copier Program Source: https://wiki.batocera.org/add_tft_screen_rpi_only Add this line to `/system/custom.sh` to automatically start the frame-buffer copier program with specified library paths on boot. ```bash LD_LIBRARY_PATH=/userdata/mybin /userdata/mybin/fbcp & ``` -------------------------------- ### Example xinitrc File Source: https://wiki.batocera.org/batocera-and-crt Reference configuration for the xinitrc file used in Batocera. ```bash #!/bin/sh # hide mouse cursor unclutter --noevents -b # disable dpms to prevent screen from blanking xset -dpms xset s off # allow coredumps for ES ulimit -H -c unlimited ulimit -S -c unlimited emulationstation # dbus launch is required for the gio/gvfs/trash:///... eval `dbus-launch --sh-syntax --exit-with-session` ``` -------------------------------- ### Configure SPI/GPIO display overlay Source: https://wiki.batocera.org/add_tft_screen_rpi_only Add this line to /boot/config.txt to enable the Waveshare 3.2-inch display with specific rotation, speed, and frame rate settings. ```text dtoverlay=waveshare32b,rotate=90,speed=22000000,fps=60 ``` -------------------------------- ### Restart EmulationStation service Source: https://wiki.batocera.org/display_issues Stop and start the EmulationStation service to apply configuration changes. ```bash /etc/init.d/S31emulationstation stop /etc/init.d/S31emulationstation start ``` -------------------------------- ### Example Output of DRM Device List Source: https://wiki.batocera.org/batocera-and-crt Sample output returned by the ls /sys/class/drm/ command. ```text card0 card0-DP-1 card0-DVI-I-1 renderD128 ttm version ``` -------------------------------- ### List Available Filesystem Types for Formatting Source: https://wiki.batocera.org/access_the_batocera_via_ssh Run `batocera-format listFstypes` to view the supported filesystem types that Batocera can format a disk to. This helps in choosing the correct format for your needs. ```bash batocera-format listFstypes ``` -------------------------------- ### Disable System Decorations Source: https://wiki.batocera.org/batocera_conf_syntax Example of a system-specific option to turn off decorations for all games of a particular system. ```plaintext nes.bezel=none ``` -------------------------------- ### Configure custom boot script for resolution Source: https://wiki.batocera.org/display_issues Use a custom script in /userdata/system/custom.sh to force specific display settings on boot. ```bash #!/bin/bash if test -z "${DISPLAY}" then export DISPLAY=:0.0 fi ## Manually set resolution xrandr --output --mode --rate ```