Author Topic: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide  (Read 22886 times)

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Just buy a Raspberry Pi 3 Model B+ and will be built up a new retro game machine with Attract Mode Frontend. We can find some guides in somewhere, but it may be not fully or not up to date. So, I would like to write a new step by step installation guide here.  :)

1. Preparation
- 5" LCD monitor
- Raspberry Pi 3 Model B+ broad
- micro SD card with Retropie 4.4 image
- Bluetooth 8bitdo SFC30 gamepad
---------------------------------------------------------------------------------------------------------

2. Installation
- Install 5 inch LCD to rpi3 device (optional)
- Download Retropie 4.4 rpi3 image from official site
- Using Win32DiskImager (Windows) to write the image to SD card
- plugin Ethernet cable (if you use wired network)
- Insert SD card to rpi and connected with usb keyboard, then turn on the device
---------------------------------------------------------------------------------------------------------

3. raspi-config Setup
On Retropie welcome screen, press F4 goto console mode

Code: [Select]
sudo raspi-config- Localisation Options > Change Wi-fi Country > Select your country
- Interfacing Options > SSH > YES to enable SSH server            
- Advanced Options > Expand Filesystem
- Advanced Options > Auido > Force 3.5mm jack (optional, if you use 3.5 mm for output sound)
- Network Options > Wi-fi > Input your wifi information (optional, if you use wifi network)
- Exit raspi-config and reboot system to take effective   
---------------------------------------------------------------------------------------------------------

4.Rotation of screen and matching monitor resolution (optional).

Code: [Select]
sudo nano /boot/config.txt

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
 
# uncomment to force a specific HDMI mode (here we are forcing 800x480!)
hdmi_group=2
hdmi_mode=87
hdmi_cvt=800 480 60 6 0 0 0
hdmi_drive=1
max_usb_current=1

# Add one of these to the bottom:
#Normal
display_rotate=0
#90 degrees
display_rotate=1
#180 degrees
display_rotate=2
#270 degrees
display_rotate=3
#horizontal flip
display_rotate=0x10000
#vertical flip
display_rotate=0x20000

Save and reboot system to take effective   
---------------------------------------------------------------------------------------------------------

5.1 Using putty to login for Update system packages & system firmware (***)

Once SSH service was enabled, you may using "putty" to remote login system
login id: pi
password: raspberry

This is very important, especially firmware update. It can make system stability and speed up performance

Code: [Select]
sudo apt-get update && sudo apt-get upgrade
sudo rpi-update

reboot system to take effective

5.2 After reboot system, the device will boot to tty1 mode. To fix it, please follow as below step:  (***)

Remote login to system

Code: [Select]
sudo raspi-config
- Select Boot Options > B1 (Desktopp/CLI) > B2 (Console Autologin)
- Exit raspi-config and reboot system to take effective

---------------------------------------------------------------------------------------------------------

6. Using putty to login for setup Bluetooth gamepad (optional)

Remote login to system

Code: [Select]
sudo /home/pi/RetroPie-Setup/retropie_setup.sh- Choose the "Configuration / Tools" menu choice > Choose the "bluetooth - Configure Bluetooth Devices" menu choice
- Make sure the 8Bitdo mapping hack option is turned "off"
- Choose the "Register and Connect to Bluetooth Device" . Here it has successfully detected the name of the controller (8Bitdo), select OK here.
- Choose the "DisplayYesNo" optin to complete the registration process
- Setup the udev rule in order for Joypad, select 8Bitdo gamepad

Save and reboot system to take effective
---------------------------------------------------------------------------------------------------------

7. Build FFmpeg with mmal support (hardware accelerated video decoding)

Remote login to system

Code: [Select]
cd ~; mkdir develop
cd ~/develop
git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-mmal --disable-debug --enable-shared
make
sudo make install
sudo ldconfig
cd ~; rm -r -f ./develop

Save and reboot system to take effective
---------------------------------------------------------------------------------------------------------

8. Retropie Setup & Install Attract Mode

Once gamepad connected, on Retropie welcome screen, press button "A". Then follow the instruction to setup all button, you may press 2 buttons at same time to skip some button setting.

- On Menu, Select retropie setup-> "update" , Yes to up date package.
- Then, select retropie setup-> "Manage core packages" -> Install/Update all core package from binary , Yes to up date package.
- Next, select retropie setup-> "Manage experimental packages" -> select "800 attactmode" to install
- After AM installed. Then using putty to remote login and run below AM script that made by "progets"
http://forum.attractmode.org/index.php?topic=1311.0
- It will be auto reboot system while the script is running completed.
- When you are going retropie menu again, you can see "Attarctmode" option in this time. Select it and auto reboot again. Next time, it will let AM boot up by default (black screen, you can press Tap button to see AM menu).
---------------------------------------------------------------------------------------------------------

9. Add attract mode in samba service  (***)
This is very very important. It will make you easy to config AM later. Retropie was opened samba service by default. We need to config samba file only.
- Login in by putty and edit samba config file

Code: [Select]
sudo nano /etc/samba/smb.conf
#add below in the last of line

[am]
comment = am
path = "/opt/retropie/configs/all/attractmode"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = root
[am2]
comment = am2
path = "/opt/retropie/supplementary/attractmode/share/attract"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = root

Save and reboot system to take effective   

After to setup samba service, you can easy to access attract mode config folder by windows now
[am]
am\emulators
am\attract.cfg
am\romlists

[am2]
am2\intro
am2\layouts
am2\modules
---------------------------------------------------------------------------------------------------------

10. Setup Attract mode
While you running AM at first time, you can see all retro systems display were mapped to AM. So, first is remove unused display system
- Access am\romlists folder and delete all unused system folder, please make sure DON'T  delete "setup" folder, this is for retropie config display
- Edit am\attract.cfg file to remove unused display system

Save and reboot system to take effective   
---------------------------------------------------------------------------------------------------------
 
11. Setup Attract mode as usual
Now, You can  put snap, flyer artworks, roms, layouts into related folders & then generate game list in finally.
---------------------------------------------------------------------------------------------------------

12. Enable HW accelerated video decoding & Sound working properly  (***)

- If you connect to 5 inch touch screen, sorry since as hdmi driver issue, it doesn't support HW accelerated. The sound will be crash if enabled.

- If you connect to normal hdmi monitor, Congratulations, it supports HW accelerated
On attact mode screen, press [Tab] goto Configure-> General-> Video Decoder, change software to mmal

Then remote login system to confirm as below setting
Code: [Select]
sudo nano /boot/config.txt
hdmi_drive=2
Save and reboot system to take effective

- If you think audio volume is too low or high. There is 2 ways to control its:
1. Access "retropie config display" page -> Audio-> Mixer to control
2. Remote login to system, and input "sudo alsamixer" command to open volume control page.
---------------------------------------------------------------------------------------------------------

Enjoy!  :)
« Last Edit: October 13, 2018, 04:58:54 PM by kent79 »

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Reserved

marcoabm

  • Newbie
  • *
  • Posts: 1
    • View Profile
Very organized! Looking forward to the sequel, I'm going to use it for the Retorpie PC and give feedback later!

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #3 on: June 03, 2018, 05:23:21 PM »
The guide is completed. Please try to follow it and reply me if any wrong  :)

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #4 on: June 04, 2018, 06:34:54 PM »
Sorry, the guide is updated since I miss one step as before  :)

- 7. Build FFmpeg with mmal support (hardware accelerated video decoding)

dmmarti

  • Sr. Member
  • ****
  • Posts: 107
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #5 on: June 08, 2018, 06:26:06 AM »
One thing on RetroPie you might run into (unless they've changed their install script over time) since you've installed Attract Mode via the RetroPie Setup script is, be careful doing RetroPie updates.

In the past when I tested that way, it all seemed to work great.  I made a bunch of changes to Attract Mode's setup (made a bunch of emulators, displays, theme changes, etc).  It all worked fine.

Then...I did a RetroPie "update all installed packages"...and that's when I found a problem.

When I did the "update all installed packages", RetroPie overwrote my attract.cfg file with the generic default one.  By doing that, it blew away all of my customization changes I'd made prior. 

Since then, I only install Attract Mode via the command line now (like you did FFMPEG).

I'm not sure if this still happens, but I wanted to mention it in case it does.

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #6 on: June 08, 2018, 01:04:33 PM »
One thing on RetroPie you might run into (unless they've changed their install script over time) since you've installed Attract Mode via the RetroPie Setup script is, be careful doing RetroPie updates.

In the past when I tested that way, it all seemed to work great.  I made a bunch of changes to Attract Mode's setup (made a bunch of emulators, displays, theme changes, etc).  It all worked fine.

Then...I did a RetroPie "update all installed packages"...and that's when I found a problem.

When I did the "update all installed packages", RetroPie overwrote my attract.cfg file with the generic default one.  By doing that, it blew away all of my customization changes I'd made prior. 

Since then, I only install Attract Mode via the command line now (like you did FFMPEG).

I'm not sure if this still happens, but I wanted to mention it in case it does.

So, why I mention to add attract mode in samba service. It will be easy to backup or restore AM config.   ;)
« Last Edit: June 08, 2018, 05:14:12 PM by kent79 »

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #7 on: June 11, 2018, 12:53:12 PM »
Report to us. There will be sound interrupted after changed to mmal hardware accelerated video decoding. So I am fall back to Software decoding. I don't recommend to enable it.   :)
« Last Edit: June 11, 2018, 01:00:59 PM by kent79 »

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 863
    • View Profile
    • new projects
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #8 on: June 11, 2018, 01:18:12 PM »
that's a bad news, I was going to try your tut on my RPi

so no hardware acceleration for videos?
the sound is grabbled via audio jack, hdmi or both?
« Last Edit: June 11, 2018, 01:21:24 PM by verion »

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #9 on: June 11, 2018, 05:43:57 PM »
that's a bad news, I was going to try your tut on my RPi

so no hardware acceleration for videos?
the sound is grabbled via audio jack, hdmi or both?

I find the cause and update guide again, you may see point #12  :)
« Last Edit: June 11, 2018, 06:00:27 PM by kent79 »

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 863
    • View Profile
    • new projects
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #10 on: June 12, 2018, 02:14:18 AM »
phew... that a relief

kent79

  • Hero Member
  • *****
  • Posts: 859
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #11 on: October 13, 2018, 05:00:54 PM »
the guide updated. Add how to fix boot in tty1 mode after updated device.  :)

5.2 After reboot system, the device will boot to tty1 mode. To fix it, please follow as below step:  (***)

Remote login to system

Code: [Select]
sudo raspi-config
- Select Boot Options > B1 (Desktopp/CLI) > B2 (Console Autologin)
- Exit raspi-config and reboot system to take effective

Cylent1

  • Guest
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #12 on: December 28, 2018, 05:17:55 PM »
I am looking for a retropie 4.4 stretch img with attractmode to use as a base img.
Would someone make one and upload it please?  I tried 10 different ways to make this and all I get is black screen or cmd line.

BeerHeadDad

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #13 on: January 27, 2019, 07:06:32 PM »
Im a rookie for sure, so please bear with me!

I tried installing FFMPEG as outlined.  There were tons of errors with many files "deprecated".  will this still work or do I need a different source for FFMPEG?

Many thanks!

wildpumpk1n

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RPi 3 Model B+ & Retropie 4.4 & AttractMode Easy Installation Guide
« Reply #14 on: January 30, 2019, 04:55:34 AM »
Did i take the time to say thanks, nooo, i totally forgot.
Thanks a lot for your awesome tutorial :) It helps a lot :)
Cheers.