Merge git://github.com/lifning/RetroArch

This commit is contained in:
Twinaphex 2012-07-04 15:49:14 +02:00
commit 4e139465d2
2 changed files with 51 additions and 22 deletions

View File

@ -1,12 +1,15 @@
## Skeleton config file for RetroArch
## with default values appropriate for Pandora
# Save all save files (*.srm) to this directory. This includes related files like .bsv, .rtc, .psrm, etc ...
# 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.
# Defaults to the same directory as the ROM.
# savefile_directory =
# Save all save states (*.state) to this directory.
# This will be overridden by explicit command line options.
# savestate_directory =
savestate_directory = /mnt/utmp/retroarch/retroarch
# Automatically saves a savestate at the end of RetroArch's lifetime.
# The path is $SRAM_PATH.auto.
@ -15,6 +18,7 @@
# Load libretro from a dynamic location for dynamically built RetroArch.
# This option is mandatory.
# On Pandora, it's usually overridden by the launcher script.
libretro_path = "/mnt/utmp/retroarch/lib/libretro-fceumm.so"
# Environment variables internally in RetroArch.
@ -28,11 +32,13 @@ libretro_path = "/mnt/utmp/retroarch/lib/libretro-fceumm.so"
# Sets the "system" directory.
# Implementations can query for this directory to load BIOSes, system-specific configs, etc.
# system_directory =
system_directory = /mnt/utmp/retroarch/
#### Video
# Video driver to use. "gl", "xvideo", "sdl" or "ext" (external API driver)
# On Pandora, "xvideo" and "sdl" are available, and "sdl" is preferred
# if using notaz's SDL omapdss.
video_driver = "sdl"
# Path to external video driver using the RetroArch driver API.
@ -48,7 +54,9 @@ video_yscale = 1.0
# video_fullscreen_y = 0
# Start in fullscreen. Can be changed at runtime.
#video_fullscreen = true
# On Pandora, this should be false, because notaz's SDL is always fullscreen,
# and the hardware scaling only helps if RetroArch doesn't software scale.
video_fullscreen = false
# Force 16-bit colors. Apparently some video cards in use today have troubles with 32-bit ...
#video_force_16bit = true
@ -63,7 +71,7 @@ video_yscale = 1.0
video_smooth = false
# Forces rendering area to stay equal to SNES aspect ratio 4:3 or as defined in video_aspect_ratio.
# video_force_aspect = true
video_force_aspect = false
# A floating point value for video aspect ratio (width / height).
# If this is not set, aspect ratio is assumed to be automatic.
@ -73,7 +81,7 @@ video_smooth = false
# 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 = false
video_aspect_ratio_auto = true
# Forces cropping of overscanned frames. Crops away top 7 scanlines and 8 bottom scanlines. (15/15 for interlaced frames).
# video_crop_overscan = false
@ -110,10 +118,10 @@ video_smooth = false
# Path to a TTF 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 =
video_font_path = /usr/share/fonts/truetype/DejaVuSansMono.ttf
# Size of the TTF font rendered.
# video_font_size = 48
video_font_size = 10
# Attempt to scale the font to fit better for multiple window sizes.
# video_font_scale = true
@ -186,6 +194,9 @@ audio_driver = alsa
# Keyboard input. Will recognize normal keypresses and special keys like "left", "right", and so on.
# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely,
# rather than relying on a default.
# On Pandora, the included mappings below match the gpio-keys
# to the SNES-style controller layout typically used in libretro.
# TODO: Decide on good l2/r2/l3/r3 mappings; map analog axes to nubs.
input_player1_a = end
input_player1_b = pagedown
input_player1_y = home

View File

@ -3,21 +3,19 @@ export PATH="/mnt/utmp/retroarch/bin:${PATH:-"/usr/bin:/bin:/usr/local/bin"}"
export LD_LIBRARY_PATH="/mnt/utmp/retroarch/lib:${LD_LIBRARY_PATH:-"/usr/lib:/lib"}"
export HOME="/mnt/utmp/retroarch" XDG_CONFIG_HOME="/mnt/utmp/retroarch"
if [ -d /mnt/utmp/retroarch/share ];then
if [ -d /mnt/utmp/retroarch/share ] ; then
export XDG_DATA_DIRS=/mnt/utmp/retroarch/share:$XDG_DATA_DIRS:/usr/share
fi
export SDL_OMAP_LAYER_SIZE="640x480"
export SDL_VIDEODRIVER="omapdss"
export SDL_AUDIODRIVER="alsa"
# choose a libretro core.
cd /mnt/utmp/retroarch/lib
BACKEND=$(ls -1 libretro*.so | zenity --list --column=Backend)
cd $HOME
if [ -z "$BACKEND" ] ; then
exit 0
fi
# if user didn't select a libretro, bail out.
[ -z "$BACKEND" ] && exit 0
# narrow down the available file formats for the file chooser.
FILTER='All files (*)|*'
case "$BACKEND" in
libretro-fceu*.so)
@ -26,13 +24,14 @@ case "$BACKEND" in
libretro-pocketsnes.so | libretro-snes9x*.so)
FILTER='SNES (*.sfc)|*.sfc'
;;
libretro-meteor.so | libretro-vba.so )
FILTER='GBA (*.gba)|*.gba'
export SDL_OMAP_LAYER_SIZE="720x480"
;;
libretro-gambatte.so)
FILTER='GBC (*.gb; *.gbc)|*.gb *.gbc'
export SDL_OMAP_LAYER_SIZE="534x480"
;;
libretro-meteor.so | libretro-vba.so )
FILTER='GBA (*.gba)|*.gba'
;;
libretro-imame4all.so) # does libretro-fba.so belong here?
FILTER='Arcade (*.zip)|*.zip'
;;
libretro-genplus.so)
FILTER='Genesis/MegaDrive (*.md; *.gen)|*.md *.gen'
@ -42,7 +41,26 @@ case "$BACKEND" in
;;
esac
ROM=$(zenity --file-selection --file-filter="${FILTER}")
# try to point the file chooser at the last used path, if there is one.
LASTROM=
if [ -r "${BACKEND}-lastrom.txt" ] ; then
LASTROM="--filename="$(head -1 "${BACKEND}-lastrom.txt")
fi
exec retroarch "${ROM}" -L "/mnt/utmp/retroarch/lib/${BACKEND}" "${@}"
ROM=$(zenity --file-selection --file-filter="${FILTER}" "${LASTROM}")
# if user didn't select a ROM, bail out.
[ -z "$ROM" ] && exit 0
echo "$ROM" > "${BACKEND}-lastrom.txt"
# use notaz's optimized driver
export SDL_VIDEODRIVER="omapdss"
export SDL_AUDIODRIVER="alsa"
# integral scaling
export SDL_OMAP_LAYER_SIZE="pixelperfect"
# preload my modified SDL that knows what "pixelperfect" is
exec env LD_PRELOAD=/mnt/utmp/retroarch/lib/libSDL-1.2.so.0.11.3 retroarch "${ROM}" -L "/mnt/utmp/retroarch/lib/${BACKEND}" "${@}"