懷舊復古的 raspberrypi RetroPie

一、相關連結

1. https://retropie.org.uk/

2. https://github.com/RetroPie/RetroPie-Setup/wiki

3. http://ponyjiang.com/retropie/retropie.html

二、安裝 Retropie

  1. https://retropie.org.uk/ 下載 RetroPie
  2. 使用Rufus 安裝retropie-4.5.xxx.img於 SD 卡中

3.第一次開機會自動修正磁碟容量(擴充整個記憶卡大小),然後依照螢幕指示設定搖桿。

On first boot your filesystem will be expanded automatically, you will then be welcomed with the following screen- this menu will configure your controls for both Emulationstation and RetroArch Emulators:

4.按  F4 鍵,到作業系統 Raspbian 的 Console

帳號:pi
密碼:raspberry

註:SSH 連線表格問題
https://retropie.org.uk/docs/SSH/

5. 更新 Raspbina  sudo apt-get upgrade

6.進入 Raspbian 的設定畫面:sudo raspi-config

7.進入”Interfacing Options” 啟用 ssh

8.查看IP

9.sudo ~/RetroPie-Setup/retropie_setup.sh

10. 完成更新 Retropie

11. 設定開機自重進入emulationstation

12. SD 卡安裝後預設已裝好核心和主要模擬器了(例如:nes mame ps sega32x …)。如要加裝其它模擬器(或更新retroPie)使用 sudo ~/RetroPie-Setup/retropie_setup.sh 命令

On RetroPie 4.0+, not everything is installed by default. The pre-made images contain the best working emulators for each system supported by the hardware. This should cover everything most users would be doing. Ports like quake and doom and some other emulators like ScummVM can be installed later.

已安裝的核心模組
已安裝的主要模組
選擇性安裝模組

三、Retropie custom screensaver

註:按「 Select」鍵 可以立即啟動 screensaver

四、更多的使用技巧

1.RetroPie Run Command Splash Screen Tutorial And Download

2. All Arcade ROMS Compatibility List

3.Hotkey

The Hotkey button enables you to press it in combination with another button to access functions such as saving, loading, and exiting emulators. It is suggested to use the Select button as the hotkey. The following chart shows the default hotkey combinations. For example, if you chose Select as your Hotkey, that means you hold down Select while pressing the other button to execute the command. Note Hotkey combinations are specific to the retroarch/libretro based emulators.

Hotkey CombinationAction
Hotkey+StartExit
Hotkey+Right ShoulderSave
Hotkey+Left ShoulderLoad
Hotkey+RightInput State Slot Increase
Hotkey+LeftInput State Slot Decrease
Hotkey+XRGUI Menu
Hotkey+BReset

4.scrape game list 抓取遊戲清單

https://retropie.org.uk/docs/Scraper/

5.手動編輯遊戲清單

五、Screen saver 螢幕保護,相簿輪播

1.設定相簿資料夾

[photos]
comment = photos
path = "/home/pi/RetroPie/photos"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = pi

2.指定路徑及選項

/home/pi/.emulationstation/es_settings.cfg

<?xml version="1.0"?>
<bool name="BackgroundJoystickInput" value="false" />
<bool name="CaptionsCompatibility" value="true" />
<bool name="DrawFramerate" value="false" />
<bool name="EnableSounds" value="true" />
<bool name="ForceDisableFilters" value="false" />
<bool name="LocalArt" value="false" />
<bool name="MoveCarousel" value="true" />
<bool name="ParseGamelistOnly" value="false" />
<bool name="QuickSystemSelect" value="true" />
<bool name="SaveGamelistsOnExit" value="true" />
<bool name="ScrapeRatings" value="true" />
<bool name="ScreenSaverControls" value="true" />
<bool name="ScreenSaverOmxPlayer" value="true" />
<bool name="ShowHelpPrompts" value="true" />
<bool name="ShowHiddenFiles" value="false" />
<bool name="SlideshowScreenSaverCustomImageSource" value="true" />
<bool name="SlideshowScreenSaverRecurse" value="false" />
<bool name="SlideshowScreenSaverStretch" value="false" />
<bool name="SortAllSystems" value="false" />
<bool name="StretchVideoOnScreenSaver" value="false" />
<bool name="UseCustomCollectionsSystem" value="true" />
<bool name="VideoAudio" value="true" />
<bool name="VideoOmxPlayer" value="false" />
<int name="MaxVRAM" value="80" />
<int name="ScraperResizeHeight" value="0" />
<int name="ScraperResizeWidth" value="400" />
<int name="ScreenSaverSwapImageTimeout" value="10000" />
<int name="ScreenSaverSwapVideoTimeout" value="30000" />
<int name="ScreenSaverTime" value="300000" />
<int name="SubtitleSize" value="55" />
<string name="AudioCard" value="default" />
<string name="AudioDevice" value="PCM" />
<string name="CollectionSystemsAuto" value="" />
<string name="CollectionSystemsCustom" value="" />
<string name="ExePath" value="/opt/retropie/supplementary/emulationstation/emulationstation" />
<string name="GamelistViewStyle" value="automatic" />
<string name="OMXAudioDev" value="both" />
<string name="PowerSaverMode" value="disabled" />
<string name="Scraper" value="ScreenScraper" />
<string name="ScreenSaverBehavior" value="slideshow" />
<string name="ScreenSaverGameInfo" value="never" />
<string name="SlideshowScreenSaverBackgroundAudioFile" value="/home/pi/.emulationstation/slideshow/audio/slideshow_bg.wav" />
<string name="SlideshowScreenSaverImageDir" value="/home/pi/RetroPie/photos" />
<string name="SlideshowScreenSaverImageFilter" value=".png,.jpg,.JPG" />
<string name="StartupSystem" value="" />
<string name="SubtitleAlignment" value="left" />
<string name="SubtitleFont" value="/usr/share/fonts/truetype/freefont/FreeSans.ttf" />
<string name="SubtitleItalicFont" value="/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf" />
<string name="ThemeSet" value="carbon" />
<string name="TransitionStyle" value="fade" />
<string name="UIMode" value="Full" />
<string name="UIMode_passkey" value="uuddlrlrba" />

回模擬器選項畫面後,按搖桿的「SELECT」按鈕, Screensaver 就會立即動作。

六、 RetroPie BGM Player v2.0

https://github.com/Naprosnia/RetroPie_BGM_Player

七、Where does RetroPie save screenshots?

1.Where does RetroPie save screenshots?

/opt/retropie/configs/all/retroarch/screenshots
Alternatively, there is a shortcut to this folder:

/home/pi/.config/retroarch/screenshots

The default screenshot directory can be changed in RGUI:
Main Menu -> Settings -> Directory -> Screenshot

八、MAME Cheat

 Ir-mamer 2003 金手指 cheat 的用法

https://github.com/RetroPie/RetroPie-Setup/wiki/lr-mame2003

http://www.endlessfight.org/forum/viewthread.php?tid=11879

1.下載 0.81 版的金手指檔案

http://cheat.retrogames.com/download/cheat081.zip

2.解壓縮, 將 cheat.dat 放到
/home/pi/RetroPie/BIOS/mame-libretro/ 目錄下,

3.遊戲中按 Tab 鍵, 就可以看到 cheat menu 了.

九、omxplayer

while true; do for i in *.mp4; do omxplayer -b --vol -10000 $i;done ;done

十、How to Display Images on Raspbian Command Line with fbi

fbi -a -t 5 *.jpg

十一、Skyscraper

https://retropie.org.uk/docs/Scraper/

https://zwindr.blogspot.com/2020/06/raspberry-pi-retropie.html

sudo RetroPie-Setup/retropie_setup.sh

十二、Retropie 4.7 聲音輸出設定

1.raspei-config、Advanced Options

2.Audio

3.Force 3.5mm headphone jack

4.RetroPie-Setup/retropie_setup.sh

5.Configuration / tool、audiosettings

6.Headphones – 3.5mm jack

十三、解決 Skyscraper video 後無法播放影音檔的問題

Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux

https://retropie.org.uk/forum/topic/15362/script-batch-convert-yuv-4-4-4-videos-to-yuv-4-2-0-in-retropie-linux

mkdir -p converted    # create the folder "converted" if it doesn't exist
for f in *.mp4        # process all videos in the current directory
  do
    echo "$(pwd)/$f"  # show the processed file's name
    c=$(ffprobe "$f" 2>&1 | grep -c yuv444p)  # (-c)ount no. of "444p"

    if [ "$c" -gt 0 ]                         # if 444p is present,
      then                                    # convert to 420p
        ffmpeg -i "$f" -y -pix_fmt yuv420p -strict experimental converted/"$f"
    fi
done
ffmpeg -i input.mp4 -y -pix_fmt yuv420p output.mp4