Advertisement
Guest User

Untitled

a guest
May 9th, 2020
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. 1) Install Retropie raspberry pi 4 image on sd card, boot & expand filesystem and setup keys in emulation station then exit emulation station
  2.  
  3. 2) Get dependencies and things we need later (we use sfml-dev from repo's not sfml-pi)
  4.  
  5. sudo apt-get install build-essential cmake libflac-dev libogg-dev libvorbis-dev libopenal-dev libfreetype6-dev libudev-dev libjpeg-dev libudev-dev libfontconfig1-dev libsfml-dev libcurl4-openssl-dev xinit fluxbox xterm x11-xserver-utils
  6.  
  7. 3) create develop dir
  8.  
  9. cd ~; mkdir develop
  10.  
  11. 4) Build ffmpeg with mmal support (can take a while you can run make -j4 to speed up the building instead just make on a pi 4)
  12.  
  13. cd ~/develop
  14. git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git
  15. cd ffmpeg
  16. ./configure --enable-mmal --disable-debug --enable-shared
  17. make -j4
  18. sudo make install
  19. sudo ldconfig
  20.  
  21. 5) Build attractmode (same here can supply -j4 to make to speed it up on a pi 4)
  22. if you want multiple monitor support add USE_XINERAMA=1 on both make statements. I'm not sure about USE_GLES=1 i've used it now
  23. and seemed to work but did not work if i provided it also on 2nd make statement if i did that attract would not run inside x
  24. cd ~/develop
  25. git clone --depth 1 https://github.com/mickelson/attract attract
  26. cd attract
  27. make -j4 USE_GLES=1 USE_XLIB=1 USE_LIBCURL=1
  28. sudo make install USE_XLIB=1 USE_LIBCURL=1
  29.  
  30. 6) set up fluxbox
  31. run startx from the pi itselve (not from ssh connection) fluxbox will start,
  32. right click desktop choose configuration -> toolbar -> visible to hide the toolbar
  33.  
  34. 7) try a test run of attract by running attract also in the xterm inside X / fluxbox by right clicking and choosing programs then shells then bash, in attract choose the language and check in general settings that you can choose mmal as videodecoder
  35.  
  36. 8) for me mmal decoder have problems with the default video memory split so i run 'sudo raspi-config' and set my memory split to 512 in advanced options and reboot although lower values might work
  37. but not changing it made video's not show up or act weird with default memory split.
  38.  
  39. 9) exit emulation station after you rebooted to set the memory split using raspi-config and
  40. edit /home/pi/.fluxbox/apps using nano
  41. this file lets you define window settings for specific apps.
  42. Some emulators run inside a window and i did not want to see the titlebar etc
  43. and also ran X Full screen so i added this (replacing anything that already existed):
  44.  
  45. [app] (name=fbrun)
  46. [Position] (WINCENTER) {0 0}
  47. [Layer] {2}
  48. [end]
  49.  
  50. [app] (name=xterm)
  51. [Maximized] {yes}
  52. [Deco] {NONE}
  53. [end]
  54.  
  55. [app] (name=PPSSPPSDL)
  56. [Deco] {NONE}
  57. [end]
  58.  
  59. [app] (name=scummvm)
  60. [Deco] {NONE}
  61. [end]
  62.  
  63. [app] (name=advmame)
  64. [Deco] {NONE}
  65. [end]
  66.  
  67.  
  68. 10) create a file runattract in /home/pi for example using 'nano /home/pi/runattract' and place this inside its to start attract but this file won't run but itselve
  69. #!/bin/bash
  70. #set governor to performance
  71. sudo sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
  72. #sleep a bit to make sure everything is started
  73. sleep 2
  74. #change background to black
  75. fbsetroot --solid black
  76. #uncomment below to set specific resolution verify first with running xrandr without params
  77. #xrandr -s 1920x1080
  78. #run attract inside xterm with with foreground black background
  79. sleep 1 && xterm -fg white -bg black -e 'attract'
  80. #when we exit attract make sure we kill X
  81. sudo killall Xorg
  82.  
  83. 11) close nano and give runattract execute rights 'chmod +x /home/pi/runattract'
  84.  
  85. 11)edit /home/pi/.fluxbox/startup using nano and change 'exec fluxbox' to '/home/pi/runattract & exec fluxbox'
  86.  
  87. 12) to disable powersaving (screen going blank) using sudo edit /etc/X11/xinit/xserverrc so 'sudo nano /etc/X11/xinit/xserverrc'
  88. change the line
  89. exec /usr/bin/X -nolisten tcp "$@"
  90. to
  91. exec /usr/bin/X -s 0 -dpms -nolisten tcp "$@"
  92.  
  93. 13) try startx again from the pi itselve it should autostart attract from a fullscreen xterm
  94.  
  95. 14) exit attract it should kill X copy your .attract setups as usual and setup extra emulators using Retropie setup script
  96.  
  97.  
  98. 15) if all of the above works correctly edit /opt/retropie/configs/all/autostart.sh replace 'emulationstation' with 'startx' so it will automatically load X
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement