PART 2 OF 3
1) On your PC, navigate to the Fruitbox Github repo:
2) Click into the build directory and open "build.txt".
3) Follow the directions found in build.txt to the letter
. The only note I will add is, read the comments in that file carefully, because it will call out which commands need to be executed specifically for a Jessie build or for a Stretch build. Don't forget to execute the "make" command at the very end.
4) On your Pi, from your home directory, change directories into the newly created rpi-fruitbox-master directory, and familiarize yourself with the contents. If you run an ls command in this directory, you should get something like this:
pi@retropie:~/rpi-fruitbox-master $ ls -ltrah
drwxr-xr-x 4 pi pi 4.0K Sep 24 17:36 . <-- Current Directory
drwxr-xr-x 19 pi pi 4.0K Sep 24 16:51 .. <-- Parent Directory
drwxr-xr-x 4 pi pi 4.0K Sep 24 17:35 build <-- Lots of stuff not to mess with here, let's leave it at that.
drwxr-xr-x 14 pi pi 4.0K Jun 16 21:36 skins <-- The Skins Directory. You will be making changes here.
-rw-r--r-- 1 pi pi 84K Jun 16 21:36 userguide.txt <-- Useful info here.
-rw-r--r-- 1 pi pi 18K Jun 16 21:36 release_notes.txt <-- Useful info here.
-rw-r--r-- 1 pi pi 2.4K Jun 16 21:36 README.md <-- Useful info here.
-rw-r--r-- 1 pi pi 484 Jun 16 21:36 skins.txt <-- Outside the scope of this guide.
-rw-r--r-- 1 pi pi 899 Jun 16 21:36 install.sh <-- Don't touch this.
-rw-r--r-- 1 pi pi 5.4M Jun 16 21:36 fruitbox-jessie <-- THIS is the one you will want to use. Notice, it is not yet executable!
-rw-r--r-- 1 pi pi 6.1M Jun 16 21:36 fruitbox-buster <-- This is for a Buster-based operating system.
-rwxr-xr-x 1 pi pi 5.5M Sep 24 17:35 fruitbox <-- This is for a Stretch-based operating system.
-rw-r--r-- 1 pi pi 113 Sep 24 17:36 fruitbox.log <-- Console output gets written here.
In addition to creating rpi-fruitbox-master in your Home Directory, it also creates an empty Music directory (pi@retropie:~/Music). This is where your MP3s go.
5) Execute the following command to make the fruitbox-jessie binary executable:
6) Perform an initial test run by invoking the fruitbox-jessie binary with no arguments.
Note: I suggest not invoking the fruitbox-jessie binary from within the SSH client on your PC (if you are using one). Frankly, I don't know whether it would even work. So for what it's worth, I recommend switching to the keyboard hooked directly into your Pi to launch the program.
Execute the following command:
This should display a short help file onscreen.
If this works, proceed to the next step.
If you receive any error, you will need to work through it. If you get stuck, the folks on this forum are very helpful.
7) Next order of business is to understand the available Fruitbox "button controls", and map your physical controller (connected to your Pi) to those in-program controls.
7a) From the rpi-fruitbox-master directory, open userguide.txt. Or, more conveniently, open userguide.txt from the Fruitbox Github repo on your PC, so you can refer back to it at any time on your computer screen. In the user guide, scroll down to section 10.1 Default Buttons. These are all the button controls available to you in Fruitbox. I recommend the following course of action.
- Determine how many total inputs are available to you (number of buttons on your game controller, control panel, etc). Don't forget to add 4 for the joystick.
- Choose (up to) that many controls from the available button controls described in the user guide.
- Map out (on paper) which physical controller inputs you want to associate with which in-program button controls.
7b) This step is optional, but recommended. Determine and document Fruitbox's button mapping values for each of your game controller inputs. This will allow you to confirm that Fruitbox can see your controller, and that it will accept input from all of your buttons and joystick. Execute the following command:
Code: Select all
sudo ./fruitbox-jessie --test-buttons
This should bring up a graphical interface, which should respond to each of the inputs on your controller by displaying Fruitbox's button mapping values for each.
For example, you may press "Start" on your controller or arcade control panel, and Fruitbox may display something like "JoyButton 0 297". In this example, it is telling you that it recognizes that button as being from controller 0 (controller 1 would denote your second, or "player 2", controller), and it has an internal value of 297. Do this for each button and all four joystick directions, and add them to your paper control mapping document. This will also allow you, in the future, to swap specific button assignments in the button configuration file directly, without having to go through the entire mapping process again (which we will perform next).
To exit from test-buttons mode, hit Ctrl-C on your keyboard.
7c) With all your button configurations planned out, execute the following command from the rpi-fruitbox-master directory:
Code: Select all
sudo ./fruitbox-jessie --config-buttons
Fruitbox will fire up and step through each of the available button controls, and allow you to map them to your physical controller. For each button control which you do not want to map to your controller, hit ESC on your keyboard. Otherwise, hit the button or joystick direction which you want to correspond with each.
If all went well, you now have a new file in your rpi-fruitbox-master directory: fruitbox.btn
Any time you subsequently run fruitbox with the --config-buttons argument, you will overwrite fruitbox.btn.
8) Next order of business is to choose a Skin and perform any necessary tweaks to that skin. This guide is already way too verbose, and Mike's userguide already covers skins in great detail. So we will just proceed with the NumberOne skin. Not all skins have joystick support. NumberOne does, but it is disabled by default (ask me how long it took me to figure that one out). We must enable it. Execute the following commands:
Code: Select all
sudo nano fruitbox.cfg
scroll down to the [joystick] section, and delete the hash tags ("#") in front of the following lines:
Code: Select all
#Bitmap = joystick.png
Hit Ctrl-x, then y, and Enter to save your changes.
9) Next order of business is to add some MP3s. Given that we are using the NumberOne skin, and we want to give our controller mapping scheme a thorough test, I have the following suggestions.
- Choose pairs of songs from each artist. The NumberOne skin implements the classic jukebox pattern of listing songs from individual artists in pairs (the A-side and B-side of a vinyl 45). You will achieve a full page of songs with no gaps if you choose songs in pairs like this.
- Choose at least 50 songs in total. This will allow you to fill one full page of songs, and test your ability to flip to a second page and back.
- In order to display properly, all chosen MP3s should have proper ID3 tags, containing at least the artist name, album name and song title. Genre may come in handy at some point as well. If you are unfamiliar with ID3 tags for MP3 files, do some Googling. Plenty of info and free ID3 tagging programs out there.
- Use an FTP program such as Core FTP LE to easily transfer MP3s from your PC to the ~/Music/ folder on your Pi.
10) Next order of business is to invoke Fruitbox from the command line, with the proper command line arguments, and test it out and play some music. Execute the following command:
Code: Select all
sudo /home/pi/rpi-fruitbox-master/fruitbox-jessie --cfg /home/pi/rpi-fruitbox-master/skins/NumberOne/fruitbox.cfg
You should now be seeing the Fruitbox logo, and then it will spin through your MP3 files one at a time, producing a database file in your home directory (~/fruitbox.db), and you will end up in a full-screen fully-functional jukebox. Hit your "insert coin" button, navigate to a song with your joystick, and click your "select song" button to play it.
If all went well, you were able to successfully launch Fruitbox, test out all your controls, play songs, and back out of the software back to your Linux command line.
If this is the case, I strongly suggest that you take the time to once again back up your image before proceeding to the INTEGRATION
portion of this guide to integrate Fruitbox with Emulationstation.
If this is not the case, and you encountered problems and got stuck, again the folks on this forum are very helpful.
One additional note. In my particular case, Fruitbox did not go to full screen right out of the box. I later came to understand that this was due to a Retropie customization that I had made long ago in my /boot/config.txt file, related to screen resolution. I do not want to go into that here, other than to say, Fruitbox makes every effort to go full screen automatically, so if it fails to do so, it's probably because of some display customizations already present in your image.
...proceed to Part 3 of 3...