概述
有幸参加微软的活动得到了一块树莓派,RaspberryPi 2 model B,对它也心仪已久,平时也常常看到国内外创客用它来做的一些好玩的东西,媒体中心、网络服务器、NAS、游戏机等等,我利用元旦一些时间打造了一个属于自己的游戏机。利用3D打印制作了一个外壳(谢谢克伟和亚军的帮助),如下所示:
开盒照:
这里我用的是RetroPie镜像,点击打开链接。它的背后是Retroarch这个游戏框架,被改动后适配raspberrypi了,因此叫做RetroPie。烧镜像这些我就不多说了,其实它的难点在于配置。烧完镜像按照官方说明 https://retropie.org.uk/docs/First-Installation/
1. 配置wifi
2. 利用U盘或者FTP工具拷贝ROM(如放到~/pi/ReTroPie/roms/snes下)
我配置好游戏模拟器主要是nes游戏,可以键盘和游戏手柄一起双人玩。
配置文件/opt/retropie/configs/all/retroarch.cfg
## Skeleton config file for RetroArch
# Save all save files (*.srm) to this directory. This includes related files like .bsv, .rtc, .psrm, etc ...
# This will be overridden by explicit command line options.
# savefile_directory =
# Save all save states (*.state) to this directory.
# This will be overridden by explicit command line options.
# savestate_directory =
# If set to a directory, Content which is temporarily extracted
# will be extracted to this directory.
# extraction_directory =
# Save all input remapping files to this directory.
# input_remapping_directory =
# Save all playlist files to this directory.
# playlist_directory =
# If set to a directory, the content history playlist will be saved
# to this directory.
# content_history_dir =
# Automatically saves a savestate at the end of RetroArch's lifetime.
# The path is $SRAM_PATH.auto.
# RetroArch will automatically load any savestate with this path on startup if savestate_auto_load is set.
# savestate_auto_save = false
# savestate_auto_load = true
# Load libretro from a dynamic location for dynamically built RetroArch.
# This option is mandatory.
# Path to a libretro implementation.
# libretro_path = "/path/to/libretro.so"
# A directory for where to search for libretro core implementations.
# libretro_directory =
# A directory for where to search for libretro core information.
# libretro_info_path =
# Sets log level for libretro cores (GET_LOG_INTERFACE).
# If a log level issued by a libretro core is below libretro_log_level, it is ignored.
# DEBUG logs are always ignored unless verbose mode is activated (--verbose).
# DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3.
# libretro_log_level = 0
# Enable or disable verbosity level of frontend.
# log_verbosity = false
# If this option is enabled, every content file loaded in RetroArch will be
# automatically added to a history list.
# history_list_enable = true
# Enable or disable RetroArch performance counters
# perfcnt_enable = false
# Path to core options config file.
# This config file is used to expose core-specific options.
# It will be written to by RetroArch.
# A default path will be assigned if not set.
core_options_path = /opt/retropie/configs/all/retroarch-core-options.cfg
# Path to content load history file.
# RetroArch keeps track of all content loaded in the menu and from CLI directly for convenient quick loading.
# A default path will be assigned if not set.
# content_history_path =
# Number of entries that will be kept in content history file.
# content_history_size = 100
# Sets the "system" directory.
# Implementations can query for this directory to load BIOSes, system-specific configs, etc.
system_directory = /home/pi/RetroPie/BIOS
# Sets start directory for menu content browser.
# rgui_browser_directory =
# Content directory. Interacts with RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY.
# Usually set by developers who bundle libretro/RetroArch apps to point to assets.
# content_directory =
# Assets directory. This location is queried by default when menu interfaces try to look for
# loadable assets, etc.
assets_directory = /opt/retropie/emulators/retroarch/assets
# Dynamic wallpapers directory. The place to store the wallpapers dynamically
# loaded by the menu depending on context.
# dynamic_wallpapers_directory =
# Boxarts directory. To store boxart PNG files.
# boxarts_directory =
# Sets start directory for menu config browser.
# rgui_config_directory =
# Show startup screen in menu.
# Is automatically set to false when seen for the first time.
# This is only updated in config if config_save_on_exit is set to true, however.
# rgui_show_start_screen = true
# Flushes config to disk on exit. Useful for menu as settings can be modified.
# Overwrites the config. #include's and comments are not preserved.
config_save_on_exit = false
# Load up a specific config file based on the core being used.
# core_specific_config = false
#### Video
# Video driver to use. "gl", "xvideo", "sdl"
video_driver = gl
# Which OpenGL context implementation to use.
# Possible ones for desktop are: glx, x-egl, kms-egl, sdl-gl, wgl.
# By default, tries to use first suitable driver.
# video_context_driver =
# Windowed x resolution scale and y resolution scale
# (Real x res: base_size * xscale * aspect_ratio, real y res: base_size * yscale)
# video_scale = 3.0
# Fullscreen resolution. Resolution of 0 uses the resolution of the desktop.
# video_fullscreen_x = 0
# video_fullscreen_y = 0
# Start in fullscreen. Can be changed at runtime.
# video_fullscreen = false
# If fullscreen, prefer using a windowed fullscreen mode.
# video_windowed_fullscreen = true
# Which monitor to prefer. 0 (default) means no particular monitor is preferred, 1 and up (1 being first monitor),
# suggests RetroArch to use that particular monitor.
# video_monitor_index = 0
# Forcibly disable composition. Only works in Windows Vista/7 for now.
# video_disable_composition = false
# Video vsync.
# video_vsync = true
# Forcibly disable sRGB FBO support. Some Intel OpenGL drivers on Windows
# have video problems with sRGB FBO support enabled.
# video_force_srgb_disable = false
# Attempts to hard-synchronize CPU and GPU. Can reduce latency at cost of performance.
# video_hard_sync = false
# Sets how many frames CPU can run ahead of GPU when using video_hard_sync.
# Maximum is 3.
# video_hard_sync_frames = 0
# Sets how many milliseconds to delay after VSync before running the core.
# Can reduce latency at cost of higher risk of stuttering.
# Maximum is 15.
# video_frame_delay = 0
# Inserts a black frame inbetween frames.
# Useful for 120 Hz monitors who want to play 60 Hz material with eliminated ghosting.
# video_refresh_rate should still be configured as if it is a 60 Hz monitor (divide refresh rate by 2).
# video_black_frame_insertion = false
# Use threaded video driver. Using this might improve performance at possible cost of latency and more video stuttering.
video_threaded = true
# Use a shared context for HW rendered libretro cores.
# Avoids having to assume HW state changes inbetween frames.
# video_shared_context = false
# Smoothens picture with bilinear filtering. Should be disabled if using pixel shaders.
video_smooth = true
# Forces rendering area to stay equal to content aspect ratio or as defined in video_aspect_ratio.
# video_force_aspect = true
# Only scales video in integer steps.
# The base size depends on system-reported geometry and aspect ratio.
# If video_force_aspect is not set, X/Y will be integer scaled independently.
# video_scale_integer = false
# A floating point value for video aspect ratio (width / height).
# If this is not set, aspect ratio is assumed to be automatic.
# Behavior then is defined by video_aspect_ratio_auto.
# video_aspect_ratio =
# If this is true and video_aspect_ratio is not set,
# aspect ratio is decided by libretro implementation.
# If this is false, 1:1 PAR will always be assumed if video_aspect_ratio is not set.
video_aspect_ratio_auto = true
# Forces cropping of overscanned frames.
# Exact behavior of this option is implementation specific.
# video_crop_overscan = true
# Path to shader. Shader can be either Cg, CGP (Cg preset) or GLSL, GLSLP (GLSL preset)
# video_shader = "/path/to/shader.{cg,cgp,glsl,glslp}"
# Load video_shader on startup.
# Other shaders can still be loaded later in runtime.
# video_shader_enable = false
# Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access.
video_shader_dir = /opt/retropie/emulators/retroarch/shader/
# CPU-based video filter. Path to a dynamic library.
# video_filter =
# Defines a directory where CPU-based video filters are kept.
# video_filter_dir =
# Path to a font used for rendering messages. This path must be defined to enable fonts.
# Do note that the _full_ path of the font is necessary!
# video_font_path =
# Size of the font rendered.
video_font_size = 16
# Enable usage of OSD messages.
# video_font_enable = true
# Offset for where messages will be placed on screen. Values are in range 0.0 to 1.0 for both x and y values.
# [0.0, 0.0] maps to the lower left corner of the screen.
# video_message_pos_x = 0.05
# video_message_pos_y = 0.05
# Color for message. The value is treated as a hexadecimal value.
# It is a regular RGB hex number, i.e. red is "ff0000".
# video_message_color = ffffff
# Video refresh rate of your monitor.
# Used to calculate a suitable audio input rate.
# video_refresh_rate = 59.95
# Allows libretro cores to set rotation modes.
# Setting this to false will honor, but ignore this request.
# This is useful for vertically oriented content where one manually rotates the monitor.
# video_allow_rotate = true
# Forces a certain rotation of the screen.
# The rotation is added to rotations which the libretro core sets (see video_allow_rotate).
# The angle is <value> * 90 degrees counter-clockwise.
# video_rotation = 0
#### Audio
# Enable audio.
# audio_enable = true
# Mutes audio.
# audio_mute_enable = false
# Audio output samplerate.
# audio_out_rate = 48000
# Audio resampler backend. Which audio resampler to use.
# Default will use "sinc".
# audio_resampler =
# Audio driver backend. Depending on configuration possible candidates are: alsa, pulse, oss, jack, rsound, roar, openal, sdl, xaudio.
# audio_driver =
# Override the default audio device the audio_driver uses. This is driver dependant. E.g. ALSA wants a PCM device, OSS wants a path (e.g. /dev/dsp), Jack wants portnames (e.g. system:playback1,system:playback_2), and so on ...
# audio_device =
# Audio DSP plugin that processes audio before it's sent to the driver. Path to a dynamic library.
# audio_dsp_plugin =
# Directory where DSP plugins are kept.
# audio_filter_dir =
# Will sync (block) on audio. Recommended.
# audio_sync = true
# Desired audio latency in milliseconds. Might not be honored if driver can't provide given latency.
# audio_latency = 64
# Enable audio rate control.
# audio_rate_control = true
# Controls audio rate control delta. Defines how much input rate can be adjusted dynamically.
# Input rate = in_rate * (1.0 +/- audio_rate_control_delta)
# audio_rate_control_delta = 0.005
# Controls maximum audio timing skew. Defines the maximum change in input rate.
# Input rate = in_rate * (1.0 +/- max_timing_skew)
# audio_max_timing_skew = 0.05
# Audio volume. Volume is expressed in dB.
# 0 dB is normal volume. No gain will be applied.
# Gain can be controlled in runtime with input_volume_up/input_volume_down.
# audio_volume = 0.0
#### Overlay
# Defines a directory where overlays are kept for easy access.
overlay_directory = /opt/retropie/emulators/retroarch/overlays
# Enable or disable the current overlay.
# input_overlay_enable = true
# Hide the current overlay from appearing in menu screens.
# input_overlay_hide_in_menu = true
# Path to input overlay
# input_overlay =
# Overlay opacity
# input_overlay_opacity = 1.0
# Overlay scale
# input_overlay_scale = 1.0
#### OSK (Onscreen Keyboard) Overlay
# Defines a directory where overlays are kept for easy access.
# osk_overlay_directory =
# Enable OSK overlay.
# input_osk_overlay_enable = true
# Path to OSK overlay
# input_osk_overlay =
# OSK Overlay opacity
# input_osk_overlay_opacity = 1.0
# OSK Overlay scale
# input_osk_overlay_scale = 1.0
#### Input
# Input driver. Depending on video driver, it might force a different input driver.
# input_driver = sdl
# Input device driver. (Valid: linuxraw, sdl, dinput)
#input_joypad_driver = sdl2
input_joypad_driver = udev
# Path to input remapping file.
# input_remapping_path =
# If enabled, overrides the input binds with the remapped binds set for the current core.
# input_remap_binds_enable = true
# Maximum amount of users supported by RetroArch.
# input_max_users = 16
# Keyboard layout for input driver if applicable (udev/evdev for now).
# Syntax is either just layout (e.g. "no"), or a layout and variant separated with colon ("no:nodeadkeys").
# input_keyboard_layout =
# Defines axis threshold. Possible values are [0.0, 1.0]
# input_axis_threshold = 0.5
# Enable input auto-detection. Will attempt to autoconfigure
# joypads, Plug-and-Play style.
input_autodetect_enable = false
# Show the input descriptors set by the core instead of the
# default ones.
# input_descriptor_label_show = true
# Hide input descriptors that were not set by the core.
# input_descriptor_hide_unbound = false
# Directory for joypad autoconfigs.
# If a joypad is plugged in, that joypad will be autoconfigured if a config file
# corresponding to that joypad is present in joypad_autoconfig_dir.
# Input binds which are made explicit (input_playerN_*_btn/axis) will take priority over autoconfigs.
# Autoconfigs can be created with retroarch-joyconfig, manually, or with a frontend.
# Requires input_autodetect_enable to be enabled.
joypad_autoconfig_dir = /opt/retropie/configs/all/retroarch-joypads/
# Sets which libretro device is used for a user.
# Devices are indentified with a number.
# This is normally saved by the menu.
# Device IDs are found in libretro.h.
# These settings are overridden by explicit command-line arguments which refer to input devices.
# None: 0
# Joypad (RetroPad): 1
# Mouse: 2
# Keyboard: 3
# Generic Lightgun: 4
# Joypad w/ Analog (RetroPad + Analog sticks): 5
# Multitap (SNES specific): 257
# Super Scope (SNES specific): 260
# Justifier (SNES specific): 516
# Justifiers (SNES specific): 772
input_libretro_device_p1 = 3
input_libretro_device_p2 = 5
# input_libretro_device_p3 =
# input_libretro_device_p4 =
# input_libretro_device_p5 =
# input_libretro_device_p6 =
# input_libretro_device_p7 =
# input_libretro_device_p8 =
# Keyboard input. Will recognize letters ("a" to "z") and the following special keys (where "kp_"
# is for keypad keys):
#
# left, right, up, down, enter, kp_enter, tab, insert, del, end, home,
# rshift, shift, ctrl, alt, space, escape, add, subtract, kp_plus, kp_minus,
# f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12,
# num0, num1, num2, num3, num4, num5, num6, num7, num8, num9, pageup, pagedown,
# keypad0, keypad1, keypad2, keypad3, keypad4, keypad5, keypad6, keypad7, keypad8, keypad9,
# period, capslock, numlock, backspace, multiply, divide, print_screen, scroll_lock,
# tilde, backquote, pause, quote, comma, minus, slash, semicolon, equals, leftbracket,
# backslash, rightbracket, kp_period, kp_equals, rctrl, ralt
#
# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely,
# rather than relying on a default.
input_player1_a = h
input_player1_b = j
input_player1_y = y
input_player1_x = u
input_player1_start = enter
input_player1_select = b
input_player1_l = q
input_player1_r = o
input_player1_left = a
input_player1_right = d
input_player1_up = w
input_player1_down = s
input_player1_l2 = e
input_player1_r2 = o
# input_player1_l3 =
input_player1_r3 = space
# Two analog sticks (DualShock-esque).
# Bound as usual, however, if a real analog axis is bound,
# it can be read as a true analog.
# Positive X axis is right, Positive Y axis is down.
# input_player1_l_x_plus =
# input_player1_l_x_minus =
# input_player1_l_y_plus =
# input_player1_l_y_minus =
# input_player1_r_x_plus =
# input_player1_r_x_minus =
# input_player1_r_y_plus =
# input_player1_r_y_minus =
# If desired, it is possible to override which joypads are being used for user 1 through 8.
# First joypad available is 0.
input_player2_joypad_index = 0
# input_player2_joypad_index = 1
# input_player3_joypad_index = 2
# input_player4_joypad_index = 3
# input_player5_joypad_index = 4
# input_player6_joypad_index = 5
# input_player7_joypad_index = 6
# input_player8_joypad_index = 7
# Input device buttons.
# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
# E.g. "h0up"
#input_player0_a_btn = "0"
#input_player0_b_btn = "1"
#input_player0_y_btn = "3"
#input_player0_x_btn = "2"
#input_player0_start_btn = "7"
#input_player0_select_btn = "6"
#input_player0_l_btn = "4"
#input_player0_r_btn = "5"
#input_player0_left_btn = "h0left"
#input_player0_right_btn = "h0right"
#input_player0_up_btn = "h0up"
#input_player0_down_btn = "h0down"
# input_player1_l2_btn =
# input_player1_r2_btn =
# input_player1_l3_btn =
# input_player1_r3_btn =
input_player2_a_btn = "1"
input_player2_b_btn = "2"
input_player2_y_btn = "3"
input_player2_x_btn = "0"
input_player2_left_btn = "h0left"
input_player2_right_btn = "h0right"
input_player2_up_btn = "h0up"
input_player2_down_btn = "h0down"
input_player2_start_btn = "9"
input_player2_select_btn = "8"
input_player2_l_btn = "4"
input_player2_r_btn = "5"
#input_player2_left_btn = "-0"
#input_player2_right_btn = "+0"
#input_player2_up_btn = "-1"
#input_player2_down_btn = "+1"
#input_player2_a_btn = "0"
#input_player2_b_btn = "1"
#input_player2_y_btn = "3"
#input_player2_x_btn = "2"
#input_player2_start_btn = "7"
#input_player2_select_btn = "6"
#input_player2_l_btn = "4"
#input_player2_r_btn = "5"
# Menu buttons.
# menu_ok_btn =
# menu_cancel_btn =
# menu_search_btn =
# menu_info_btn =
# menu_default_btn =
# menu_scroll_down_btn =
# menu_scroll_up_btn =
# Axis for RetroArch D-Pad.
# Needs to be either '+' or '-' in the first character signaling either positive or negative direction of the axis, then the axis number.
# Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
input_player2_left_axis = "-0"
input_player2_right_axis = "+0"
input_player2_up_axis = "-1"
input_player2_down_axis = "+1"
# Holding the turbo while pressing another button will let the button enter a turbo mode
# where the button state is modulated with a periodic signal.
# The modulation stops when the button itself (not turbo button) is released.
# input_player1_turbo =
# Describes the period and how long of that period a turbo-enabled button should behave.
# Numbers are described in frames.
# input_turbo_period = 6
# input_turbo_duty_cycle = 3
# This goes all the way to user 8 (*_player2_*, *_player3_*, etc), but omitted for clarity.
# All input binds have corresponding binds for keyboard (none), joykeys (_btn) and joyaxes (_axis) as well.
# Toggles fullscreen.
# input_toggle_fullscreen = f
# Saves state.
# input_save_state = f2
# Loads state.
# input_load_state = f4
# State slots. With slot set to 0, save state name is *.state (or whatever defined on commandline).
# When slot is != 0, path will be $path%d, where %d is slot number.
input_state_slot_increase = x
input_state_slot_decrease = c
# Toggles between fast-forwarding and normal speed.
# input_toggle_fast_forward = space
# Hold for fast-forward. Releasing button disables fast-forward.
# input_hold_fast_forward = l
# Key to exit RetroArch cleanly.
# Killing it in any hard way (SIGKILL, etc) will terminate RetroArch without saving RAM, etc.
# On Unix-likes, SIGINT/SIGTERM allows a clean deinitialization.
input_exit_emulator = escape
# Applies next and previous shader in directory.
input_shader_next = m
input_shader_prev = n
# Hold button down to rewind. Rewinding must be enabled.
input_rewind = r
# Toggle between recording and not.
# input_movie_record_toggle = o
# Toggle between paused and non-paused state
# input_pause_toggle = p
# Frame advance when content is paused
# input_frame_advance = k
# Reset the content.
#input_reset = z
# Cheats.
# input_cheat_index_plus = y
# input_cheat_index_minus = t
# input_cheat_toggle = u
# Mute/unmute audio
# input_audio_mute = f9
# Take screenshot
# input_screenshot = f8
# Netplay flip users.
# input_netplay_flip_players = i
# Hold for slowmotion.
# input_slowmotion = e
# Enable other hotkeys.
# If this hotkey is bound to either keyboard, joybutton or joyaxis,
# all other hotkeys will be disabled unless this hotkey is also held at the same time.
# This is useful for RETRO_KEYBOARD centric implementations
# which query a large area of the keyboard, where it is not desirable
# that hotkeys get in the way.
# Alternatively, all hotkeys for keyboard could be disabled by the user.
# input_enable_hotkey_btn =
# Increases audio volume.
input_volume_up = kp_plus
# Decreases audio volume.
input_volume_down = kp_minus
# Toggles to next overlay. Wraps around.
# input_overlay_next =
# Toggles eject for disks. Used for multiple-disk content.
# input_disk_eject_toggle =
# Cycles through disk images. Use after ejecting.
# Complete by toggling eject again.
# input_disk_next =
# Toggles menu.
input_menu_toggle = F1
# RetroPad button combination to toggle menu
# 0 = none, 1 = L + R + Y + D-Pad Down, 2 = L3 + R3
# input_menu_toggle_gamepad_combo = 0
# Toggles mouse grab. When mouse is grabbed, RetroArch hides the mouse,
# and keeps the mouse pointer inside the window to allow relative mouse input
# to work better.
# input_grab_mouse_toggle = f11
#### Menu
# Menu driver to use. "rgui", "lakka", etc.
# menu_driver = "rgui"
# If enabled, the libretro core will keep running in the background when we
# are in the menu.
# menu_pause_libretro = false
# Enable mouse input inside the menu.
# menu_mouse_enable = false
# Enable touch input inside the menu.
# menu_pointer_enable = false
# Shows current date and/or time inside menu.
menu_timedate_enable = true
# Shows current core inside menu.
# menu_core_enable = true
# Path to a .png image to set as menu wallpaper.
# menu_wallpaper =
# Dynamically load a new wallpaper depending on context.
# menu_dynamic_wallpaper_enable = false
# Display boxart in place of the content icon if available
# menu_boxart_enable = false
# Wrap-around toe beginning and/or end if boundary of list reached horizontally
# menu_navigation_wraparound_horizontal_enable = false
# Wrap-around to beginning and/or end if boundary of list reached vertically
# menu_navigation_wraparound_vertical_enable = false
# Filter files being show in 'Load Content' by supported extensions
# menu_navigation_browser_filter_supported_extensions_enable = true
# Collapse subgroup settings into main group to create one big listing of settings
# per category.
# menu_collapse_subgroups_enable = false
#### UI
# Suspends the screensaver if set to true. Is a hint that does not necessarily have to be honored
# by video driver.
# suspend_screensaver_enable = true
# Start UI companion driver's interface on boot (if available).
# ui_companion_start_on_boot = true
#### Camera
# Override the default camera device the camera driver uses. This is driver dependant.
# camera_device =
# Override the default privacy permission for cores that want to access camera services. Is "false" by default.
# camera_allow = false
#### Location
# Override the default privacy permission for cores that want to access location services. Is "false" by default.
# location_allow = false
#### Core Updater
# URL to core update directory on buildbot.
# core_updater_buildbot_url = "http://buildbot.libretro.com"
# URL to assets update directory on buildbot.
# core_updater_buildbot_assets_url = "http://buildbot.libretro.com/assets/"
# Automatically extract archives that the cores are contained in to the libretro cores directory.
# core_updater_auto_extract_archive = true
#### Network
# When being client over netplay, use keybinds for user 1.
# netplay_client_swap_input = false
# The username of the person running RetroArch. This will be used for playing online, for instance.
# netplay_nickname =
# The amount of delay frames to use for netplay. Increasing this value will increase
# performance, but introduce more latency.
# netplay_delay_frames = 0
# Netplay mode for the current user.
# false is Server, true is Client.
# netplay_mode = false
# Enable or disable spectator mode for the user during netplay.
# netplay_spectator_mode_enable = false
# The IP Address of the host to connect to.
# netplay_ip_address =
# The port of the host IP Address. Can be either a TCP or an UDP port.
# netplay_ip_port = 55435
#### Misc
# Enable rewinding. This will take a performance hit when playing, so it is disabled by default.
rewind_enable = false
# Rewinding buffer size in megabytes. Bigger rewinding buffer means you can rewind longer.
# The buffer should be approx. 20MB per minute of buffer time.
rewind_buffer_size = 10
# Rewind granularity. When rewinding defined number of frames, you can rewind several frames at a time, increasing the rewinding speed.
rewind_granularity = 2
# Pause gameplay when window focus is lost.
# pause_nonactive = true
# Autosaves the non-volatile SRAM at a regular interval. This is disabled by default unless set otherwise.
# The interval is measured in seconds. A value of 0 disables autosave.
# autosave_interval =
# Path to content database directory.
# content_database_path =
# Path to cheat database directory.
# cheat_database_path =
# Path to XML cheat config, a file which keeps track of which
# cheat settings are used for individual games.
# If the file does not exist, it will be created.
# cheat_settings_path =
# Directory to dump screenshots to.
# screenshot_directory =
# Records video after CPU video filter.
# video_post_filter_record = false
# Records output of GPU shaded material if available.
# video_gpu_record = false
# Screenshots output of GPU shaded material if available.
video_gpu_screenshot = true
# Block SRAM from being overwritten when loading save states.
# Might potentially lead to buggy games.
# block_sram_overwrite = false
# When saving a savestate, save state index is automatically increased before
# it is saved.
# Also, when loading content, the index will be set to the highest existing index.
# There is no upper bound on the index.
# savestate_auto_index = false
# Slowmotion ratio. When slowmotion, content will slow down by factor.
# slowmotion_ratio = 3.0
# The maximum rate at which content will be run when using fast forward. (E.g. 5.0 for 60 fps content => 300 fps cap).
# RetroArch will go to sleep to ensure that the maximum rate will not be exceeded.
# Do not rely on this cap to be perfectly accurate.
# If this is set at 0, then fastforward ratio is unlimited (no FPS cap)
# fastforward_ratio = 0.0
# Enable stdin/network command interface.
# network_cmd_enable = false
# network_cmd_port = 55355
# stdin_cmd_enable = false
input_enable_hotkey = nul
auto_remaps_enable = true
# input_player2_analog_dpad_mode = 1
这里我采用的是键盘作为Player1而罗技F710游戏手柄作为Player2,这里谢谢保来同学的游戏手柄: -)
一开始的问题是Joypad不能控制游戏,后来是手柄和键盘同时控制游戏中的player1。最后完美解决的配置就是我上面这样的,可以键盘和手柄一起玩双人的游戏,气球大战、魂斗罗、坦克大战等等。
在下图的Configure Input中(按键盘Enter键呼出这个配置菜单),这里设置的是你的Emulation station的操作,设置什么键选择模拟器,哪个键用来进入游戏等等。我这里配置用键盘来控制。长按一个键,表示不设置那个选项。
后面配置手柄也是通过这个,手柄配置好后/opt/retropie/configs/all/retroarch-joypads下有它的一些文件
这里改动的地方:
339: input_joypad_driver=udev
358: input_autodetect_enable=false
392: input_libretro_device_p1=3
input_libretro_device_p2=5
447: input_player2_joypad_index=0
input_autodetect_enable=false(花了几个小时才找到这个地方,可以起作用),1P和2P串键,也就是1P的控制也会带动2P角色的移动。
按键冲突的地方:
545、573、576
另外,这里的配置是所有游戏模拟器的配置,包括Macintosh、PC、nes、snes等等,而各自的配置在/opt/retropie/configs/nes里。优先各个模拟器的配置,如果有,就会覆盖全局的,没有的话就采用全局的配置。
几个常常用到的快捷键:
ESC大退
F4重启Emulation Station,一般改动过,比如增加了个游戏,重启一下就可以看到了。
回车键进入Menu,如下图所示:
Scraper表示游戏简介,你可以联网更新游戏的封面,简介等等。如下图所示:
这里要说一下这个Retropie,它的Retropie-setup有很多有用的设置,包括主题更新等等
==================================2017.08====================================
更新到最新的系统后retropie-4.2(2017.03.20)后,官方的更新说明 https://retropie.org.uk/2017/03/retropie-4-2-released/
- Kodi 17 now installable from optional packages.
发现有些地方的设置不一样了,可以直接接入键盘和手柄
1. 第一个问题就是利用进入游戏不全屏,进入游戏前,按下任意一个按键,在ROM配置界面,video output选择DMT 35(未完美解决,实际还是有一点黑边)
2. 没有声音,在retropie界面audio-强制选择HDMI声音输出(已解决)
3. 我这里键盘作为主控,设置Enter回车键为进入游戏,但是退出游戏默认也是Enter,input_exit_emulator = enter。
在/opt/retropie/configures/all/retropieconfig.cfg文件中我修改为
input_exit_emulator = b 和下面那句input_reset = f5
这里其实体现了一个思路,游戏手柄没有那么多按键,组合键input_enable_hotkey 和这里的input_exit_emulator两个按键同时按下,就是强制退出游戏,回到游戏模拟器列表。组合键input_enable_hotkey 和input_reset所表示的按键同时按下,就是重启游戏回到人数选择、关卡选择界面,特别是玩家1和玩家2都是手柄的时候。
当然我这里玩家1用键盘,玩家2用手柄,我的键盘键位多,就可以不开启input_enable_hotkey 而直接设置input_exit_emulator和input_reset的键值。在cfg文件中直接注释input_enable_hotkey 就好——还需改善(以前我设置的escape键,好像不起作用)
4. 关于键盘布局。因为树莓派是英国的所以键盘布局也是英式的,和平常的美式键盘布局不一样, 最大的问题就是,你输入@和#号的时候,发现变化了。输入|变为井号键#,输入@键变为了“,简单修改个配置就还好,日常使用还是需要改改的。
sudo raspi-config
选择Internationalistation Options 选项
然后选择change keyboard layout 修改键盘布局
选择Generic 104-key pc
再选择English(US)
Altgr选择the default for the keyboard layout
compose key选择no compose key
此外,还有一种方法是debian系的自己的键盘布局选择工具
sudo apt-get update
sudo apt-get install console-data
sudo dpkg-reconfigure console-data 然后选择最下面那一项中的,pc ——qwerty——Unitied States——standard——standard,Raspian可以变回正常,但是这里不行
5. 丑丑的主题换掉
安装主题是在Retropie大界面下的Retropie setup里,先可以预览主题缩略图,然后再安装,总共三十多个主题
Main Menu——UI Setting——最下面的Theme——Tronkyfran(个人一直用这个)
6. 游玩时间那些关掉
Main Menu——Other Settings——Save Metadata On Exit:off
7. ROM读写权限归为普通用户pi(表现在用sftp从树莓派中拷ROM出来做备份的时候,有些会拷贝不出来)
Configuration / Tools >> resetromdirs
========================================================
https://retropie.org.uk/docs/First-Installation/
Hotkeys
Hotkeys enable you to press a combination of buttons to access functions such as saving, loading, and exiting emulators. The following chart shows the default hotkey combinations. By default, the hotkey is select so that means you hold down select while pressing another button to execute a command. Note that hotkeys are only specific to the retroarch/libretro based emulators.
How do I change which buttons to press to exit an emulator with a controller?
Hotkeys are combinations of buttons you can press in order to access options such as saving, loading, and exiting games. The following defaults are set automatically the first time you set up your controller from emulationstation.
Default joypad hotkeys:
You can adapt the above code example and choose the button number to your desired button for each hotkey function in the retroarch.cfg files for most systems (at least all the emulators that are part of RetroArch)
You can change it per controller with your autoconfig file here
/opt/retropie/configs/all/retroarch-joypads/yourgamepad.cfg
You can Hardcode it globally for all systems here:
/opt/retropie/configs/all/retroarch.cfg
or set it by system
/opt/retropie/configs/SYSTEMNAME/retroarch.cfg
See HERE for more information on custom controller configs
========================================================
SSH as root anymore?
The root password is disabled by default (as is the case for Raspbian and many other linux distros).
before setting a root password, the following must be edited
sudo nano /etc/ssh/sshd_config
look for
PermitRootLogin without-password
change it to
PermitRootLogin yes
then ctrl+x to save,
next set your root password:
sudo passwd root
restart your Pi to register your changes
see these posts for more details:
https://www.raspberrypi.org/documentation/linux/usage/root.md
http://elinux.org/R-Pi_Troubleshooting#I_don.27t_know_the_root_password
Where did the desktop go?
The PIXEL (formerly LXDE) desktop environment was removed from the RetroPie image to keep it smaller.
It can easily be installed from the RetroPie Setup Script
in Configuration / Tools >> Raspbiantools >> Install Pixel Desktop Environment
after installation it will be accessible from the ports menu of EmulationStation or can be called from the command line with startx
You can also install it manually with:
sudo apt-get install --no-install-recommends lxde
sudo apt-get install xorg raspberrypi-ui-mods rpi-chromium-mods
And then you can access it from the terminal by typing in
startx
After installation your pi will boot into the desktop environment, you can change the behaviour to boot into emulationstation by selecting the autostart option for emulationstation from the configuration/tools section of the setup script, or you can set the autologin to console option from the boot options of the raspi-config menu.
Note that failing to run startx after the installation may prevent other XWindow-based applications from starting (e.g. Micropolis port), so do launch the desktop after installation to ensure that it is fully set up.
Note that you cannot run PIXEL and Retropie at the same time. You will need to log out of PIXEL completely to start EmulationStation
==================================
关于分辨率问题
https://retropie.org.uk/docs/Smaller-RetroArch-Screen/
https://retropie.org.uk/docs/Video-Issues/
http://elinux.org/RPiconfig#Video_mode_options
确定自己的显示器支持什么格式
Setting in /boot/config.txt
hdmi_group=1
hdmi_mode=1
- Set the output format to VGA 60 Hz (hdmi_group=1 hdmi_mode=1) and boot up the Raspberry Pi
- Enter the following command to give a list of CEA supported modes
/opt/vc/bin/tvservice -m CEA
- Enter the following command to give a list of DMT supported modes
/opt/vc/bin/tvservice -m DMT
- Enter the following command to show your current state
/opt/vc/bin/tvservice -s
- Enter the following commands to dump more detailed information from your monitor
/opt/vc/bin/tvservice -d edid.dat /opt/vc/bin/edidparser edid.dat
The edid.dat should also be provided when troubleshooting problems with the default HDMI mode
================================================================
/opt/retropie/configs/nes/retroarch.cfg
# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
input_remapping_directory = "/opt/retropie/configs/nes/"
input_autodetect_enable = false
input_libretro_device_p1 = 3
input_libretro_device_p2 = 5
input_player1_a = "j"
input_player1_b = "k"
input_player1_x = "u"
input_player1_y = "i"
input_player1_start = "enter"
input_player1_select = "b"
input_player1_up = "w"
input_player1_down = "s"
input_player1_left = "a"
input_player1_right = "d"
input_player2_joypad_index = 0
input_player2_a_btn = "14"
input_player2_b_btn = "13"
input_player2_x_btn = "15"
input_player2_y_btn = "12"
input_player2_left_btn = "7"
input_player2_right_btn = "5"
input_player2_up_btn = "4"
input_player2_down_btn = "6"
input_player2_start_btn = "3"
input_player2_select_btn = "0"
input_player2_l_x_plus = "+0"
input_player2_l_x_minus = "-0"
input_player2_l_y_plus = "-1"
input_player2_l_y_minus = "+1"
input_player2_r_x_plus = "+2"
input_player2_r_x_minus = "-2"
input_player2_r_y_plus = "-3"
input_player2_r_y_minus = "+3"
input_enable_hotkey = nul
input_reset = "h"
input_exit_emulator = "escape"
input_menu_toggle = "F1"
#include "/opt/retropie/configs/all/retroarch.cfg"
最后
以上就是专一小笼包为你收集整理的基于RaspberryPi 2 model B 的游戏机——ReTroPie的设置的全部内容,希望文章能够帮你解决基于RaspberryPi 2 model B 的游戏机——ReTroPie的设置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复