Saturday 14 February 2015

Retro Pie

Not really about Linux mint but I thought I would add my notes here from setting up Retropie on my Raspberry Pi 256m. Just for my benefit incase I lose my tomboy note pad somehow.

Notes are grabbed from various sources. If I need to remove them or credit please tell me.







RetroPie Notes

Note from 2015-02-02 20:22:15.304

First Set-up change memory split from root file system : $ sudo raspi-config
also expand file system to fit card size

----------------------------------------------------------------------------------------------------------------------------------------------------
SETUP SCREEN

$ cd RetroPie-Setup
$ sudo ./retropie_setup.sh

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

If screen goes black ALT F2 then ALT F1 may work

Exit Emulation Station F4

When upgrading anything exit Emulation Station

Easy file copy Filezilla - use sFTP

Game Boy Advance - gba_bios.bin is stored in /opt/retropie/emulators/gpsp/

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

Emulation Station config files for Joysticks info

top level config is for main emulation station controller and to control the main front end screen only. Start Em Stn 1st time it detects and asks.
To reset it up use console option or from terminal to delete file and make a new one
rm /home/pi/.emulationstation/es_input.cfg

To have controllers also work on the emulators edit the main emulator configuration file with the controller’s button information.

Basic way to start from scratch Use ‘retroarch-joyconfig’
find it (in case its been moved).

sudo find / -name retroarch-joyconfig

Maybe its here : /opt/retropie/emulators/RetroArch/tools
To store keymaps create a folder in the pi’s home directory with: mkdir /home/pi/keymaps
go to that directory: cd /home/pi/keymaps (one controller plugged in at a time when doing this)
/opt/retropie/emulators/retroarch/retroarch-joyconfig > /home/pi/keymaps/SNES_1.txt

View this file with Cat
pi@raspberrypi ~/keymaps $ cat SNES_1.txt
input_player1_joypad_index = “0”
input_player1_b_btn = “2”
input_player1_y_btn = “3”
input_player1_select_btn = “8”
input_player1_start_btn = “9”
input_player1_up_axis = “-1″
input_player1_down_axis = “+1″
input_player1_left_axis = “-0″
input_player1_right_axis = “+0″
input_player1_a_btn = “1”
input_player1_x_btn = “0”
input_player1_l_btn = “4”
input_player1_r_btn = “5”
input_player1_l2_btn = “9”
input_player1_r2_btn = “9”
input_player1_l3_btn = “9”
input_player1_r3_btn = “9”
input_player1_l_x_plus_btn = “9”
input_player1_l_x_minus_btn = “9”
input_player1_l_y_plus_btn = “9”
input_player1_l_y_minus_btn = “9”
input_player1_r_x_plus_btn = “9”
input_player1_r_x_minus_btn = “9”
input_player1_r_y_plus_btn = “9”
input_player1_r_y_minus_btn = “9”

Start button for all the other unused buttons is used here i.e.(9)

Now use RetroArch (the main configuration for all emulators). To find these (example)

pi@raspberrypi ~ $ sudo find / -name retroarch.cfg

RESULT
/etc/retroarch.cfg/opt/retropie/emulators/RetroArch/pandora/retroarch/retroarch.cfg/opt/retropie/emulators/RetroArch/retroarch.cfg/opt/retropie/configs/nes/retroarch.cfg/opt/retropie/configs/atari2600/retroarch.cfg/opt/retropie/configs/segacd/retroarch.cfg/opt/retropie/configs/megadrive/retroarch.cfg/opt/retropie/configs/mame/retroarch.cfg/opt/retropie/configs/mastersystem/retroarch.cfg/opt/retropie/configs/gamegear/retroarch.cfg/opt/retropie/configs/psx/retroarch.cfg/opt/retropie/configs/snes/retroarch.cfg/opt/retropie/configs/gb/retroarch.cfg/opt/retropie/configs/all/retroarch.cfg/opt/retropie/configs/gbc/retroarch.cfg/opt/retropie/configs/doom/retroarch.cfg/opt/retropie/configs/fbs/retroarch.cfg/opt/retropie/configs/pcengine/retroarch.cfg/opt/retropie/configs/cavestory/retroarch.cfg/opt/retropie/configs/sega32x/retroarch.cfg

The one that controls all of them is :
The others over-ride this file for individualisation, so you can amend the controller set-up for individual systems so
the right buttons cause the correct effect such as fire always being the same button on each emulator. REMEMBER this file will only effect all the emulators that work with RetroArch, the main frontend control.

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

To change the main config file in the "all" folder use nano from Terminal: /opt/retropie/configs/all $ nano retroarch.cfg

# Joypad buttons.
# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
# E.g. “h0up”
# input_player1_a_btn =
# input_player1_b_btn =
# input_player1_y_btn =
# input_player1_x_btn =
# input_player1_start_btn =
# input_player1_select_btn =
# input_player1_l_btn =
# input_player1_r_btn =
# input_player1_left_btn =
# input_player1_right_btn =
# input_player1_up_btn =
# input_player1_down_btn =
# input_player1_l2_btn =
# input_player1_r2_btn =
# input_player1_l3_btn =
# input_player1_r3_btn =
/p
# Axis for RetroArch D-Pad.
# Needs to be either ‘+’ or ‘-‘ in the first character signaling either positive or negative direction of the axis, then the axis number.
# Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
# input_player1_left_axis =
# input_player1_right_axis =
# input_player1_up_axis =
# input_player1_down_axis =

Uncomment input lines (remove #) and refer to your previous results found in the SNES_1.txt you made earlier and stored in /home/pi/keymaps
Add the button numbers including quotes "" to match.
input_player1_a_btn = "1" for example.
Change the axis's to match also. these are for the D-Pad.

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

Now enable Hot Keys (multi-button presses for other functions such as exiting). The example below uses double key presses to Select, Start,menu,save games and audio up/down.

input_enable_hotkey_btn = 8 #Select
input_exit_emulator_btn = 9 #Start
input_save_state_btn = 1 #A button
input_load_state_btn = 2 #B button
input_state_slot_increase_btn = 5 #R button
input_state_slot_decrease_btn = 4 #L button
input_reset_btn = 0 #X button
input_menu_toggle_btn = 3 #Y button
input_state_slot_increase_axis = +0 #Right on D pad
input_state_slot_decrease_axis = -0 #Left on D pad
input_reset_axis = -1 #Up on D pad
input_audio_mute_axis = +1 #Down on D pad

Save this in nano CTRL + X
Y
Enter

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

Saving Game States (i.e. part way through). To do this you can give permission to your "Pi" user account to save in the folder normally only available to the "root" user where all saves are made. Failure to save is caused by you not having permission to write to the root folder.
sudo chown -R pi /home/pi/RetroPie

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

Wireless XBOX 360 controller set-up

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

Duke 3D Install Issues

original DUKE3D.GRP must be in /home/pi/RetroPie/roms/duke3d
Joystick needs setting up and checking in the options

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

Set up wireless network from terminal

sudo nano /etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0


iface wlan0 inet dhcp
wpa-ssid "ssid"
wpa-psk "password"

change ssid and password to yours

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

BACKUP Pi SD CARD

Place card in Linux PC
Go to ROOT : $ sudo sh

find out what device the card is : $ fdisk -l
check by seeing what size card is e.g. 15.8 G

My card usually under /dev/SDC
dd is the copy image program, if (input file), of (output file), bs (baud speed, K,KB or M is multiplier speed of writing)

Use dd (execute it in folder you are saving to) : $ dd if=/dev/sdc of=THIS_IS_WHAT_IM_CALLING_IT.img bs=4M
Check it is there : $ ls -l -h
Compress file (minus 1 least compressed to minus 9 highest compression) : $ gzip -9 MY_CARD.img

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

SOUND ISSUES

Set for HDMI or Audio Jack ?
Not using HDMI to DVI converter ? (DVI no sound throughput)

test from Terminal if sound using aplay : $ aplay /usr/share/sounds/alsa/Front_Center.wav

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

Thursday 12 February 2015

Wow, been some time and rzip

Wow, forgot how long it's been on here. My little place I keep my hints for myself and any others who get the same issues as me.
Obviously there are less issues with Linux Mint and I've not broken anything enough yet.

Anyway needed to do some compression on files today. Did a search, read a bit and it looks like rzip, from the repository was the one for me. Apparently lrzip is slightly better but I'd started encoding by the time I looked at that and it's just an upgrade to rzip.

So first I install it.

do a : rzip --help   for the info.

 -0            fastest (worst) compression
 -6            default compression
 -9            slowest (best) compression
 -d            decompress
 -o filename   specify the output file name
 -S suffix     specify compressed suffix (default '.rz')
 -f            force overwrite of any existing files
 -k            keep existing files
 -P            show compression progress
 -V            show version

Important notes being without the "-k" it deletes the original file after compression. I may not want that sometimes.