Search:  
Gentoo Wiki

HOWTO_PSP


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

I love my PSP and games, and yeap I am a Gentoo user. So here is a HowTo PSP for Gentoo Linux!

Using QPSPmanager

Here is some nice software for managing your savefiles and such : http://qpspmanager.sourceforge.net/

Instructions for Installing / Using QPSPManager :

1] Download the qpspmanager-x.x.x.tar.gz (Source) file from the above link.
2] Unpack the file into a folder.
3] You will get a qpspmanager folder inside it.
4] Open up xterm,konsole,etc and go inside the qpspmanager/src folder.
5] Type qmake . This will automatically generate the makefile for compiling the application.
6] Type make . This will compile the application.
7] Now, simply type make install which will install the application.
8] You can now type qpspmanager in a console to run the application.
9] The first time, it will give an error about missing options. Just go to Options and set the necessary things.


Automount PSP with ivman and Manage Isos with zenity

Here is my scripts. I've got a problem with my PSP and I can't USE my UMD drive aymore, but I have too much and I like them. Then I bought a big MEMCARD and I got the ISO's :S. Then I tried to simplify the work of uncompress, copy, sync, and umount. I use 4 program, ivman, 7zip, zenity, rsync, and a bunch of bash script code. I use "/home/ignacio/.icons/glass-icons/scalable/devices/usb-Sony_PSP_Type_A-part1.png" icon to every script. I have "/mnt/PSP" as my PSP root and "/mnt/treasure/Portable/PSP/SaveGames/" where I copy savegames. The Iso's should be compressed with 7z and only 1 file inside (.cso or .iso) First of all emerge ivman, after it is working we add some lines to config:

File: IvmConfigActions.xml
    <ivm:Match name="hal.info.vendor" value="Sony">
        <ivm:Match name="hal.info.product" value="PSP">
            <ivm:Option name="exec" value="/usr/local/bin/pspmount" />
        </ivm:Match>
    </ivm:Match>

Then we do the pspmount script:

Code: /usr/local/bin/pspmount
#!/bin/bash
#Made by Dreamer to you.
        zenity  --notification  --window-icon=/home/ignacio/.icons/glass-icons/scalable/devices/usb-Sony_PSP_Type_A-part1.png  --text "PSP Mounted" &  #I'm using Gnome right now
        echo "Play Station Portable Ready" | festival --tts --language english & #I Like to hear that my PSP is mounted.
        sh /usr/local/bin/pspsave.sh  #ask me for save my gamedata save to my harddisk
        sh /usr/local/bin/pspgames.sh #ask my to manage psp iso's.

Here is the savegames script:

Code: /usr/local/bin/pspsave.sh
#!/bin/bash
#Made by Dreamer to you.
zenity --question --text="Do you want to save your GameData Saves to your Harddisk?" --window-icon=/home/ignacio/.icons/glass-icons/scalable/devices/usb-Sony_PSP_Type_A-part1.png || exit
rsync -auvz /mnt/PSP/psp/savedata       /mnt/treasure/Portable/PSP/SaveGames/ | zenity --text-info --title "Copying Savegames" --width 400 --height 200 --window-icon=/home/ignacio/.icons/glass-icons/scalable/devices/usb-Sony_PSP_Type_A-part1.png
echo "Game Data Saved" | festival --tts --language english

And here is my script to manage psps games/iso. I know it is very buggy and my english is not the best, feel free to change =).

Code: /usr/local/bin/pspgames.sh
#!/bin/bash
#Made by Dreamer to you.

##################### VARIABLES ######################
PSPISO=/mnt/treasure/Portable/PSP/ISO
PSPDIR=/mnt/PSP
PSPDIRISO=$PSPDIR/iso
MEM=0
MEMSTICK=$(df -h /mnt/PSP/ | grep -v TamaƱo | awk '{print $2 }')
ICON=/home/ignacio/.icons/custom/png/psp-mounted.png
TEMPDIR=/mnt/treasure/tmp
GAMESLIST=/tmp/PSPGamesList.tmp
GAMESLIST2=/tmp/PSPGamesList2.tmp
GAMESCHOSEN=/tmp/PSPGamesChosen.tmp
GAMESINPSP=/tmp/PSPGamesInPSP.tmp
GAMESINPSP2=/tmp/PSPGamesInPSP2.tmp
GAMESDELETE=/tmp/PSPGamesDelete.tmp
#####################################################
function funcborra {
	if [ -z $1 ]; then
	TITLEVAR="Deleting Games.."
	else
	TITLEVAR="You need to free $1"
	fi
	####################################### CARGA DE JUEGOS de PSP ##############################
	cd $PSPDIRISO
	for j in *.*; do
	        echo "$j $(expr `stat --format=%s "$j"` / 1000000)MB check" >> $GAMESINPSP
	done
	jin=`cat $GAMESINPSP | wc -l`
	head -n $[ $jin - 1 ] $GAMESINPSP > $GAMESINPSP2
	tail -n 1 $GAMESINPSP | awk '{print $1,$2}' >> $GAMESINPSP2
	rm $GAMESINPSP	
	#############################################################################################

	filesin=$(zenity --list --title "$TITLEVAR" --checklist --column="Check" --column="Games" --column="Size" "" `cat $GAMESINPSP2` --window-icon=$ICON --separator=":" --width="800" --height="500")
	if [ -z $filesin ];
	then
		sync | zenity --progress --title "Closing.." --pulsate --auto-close
		exit
	else
	echo $filesin > $GAMESDELETE
	rm $GAMESINPSP2
	CUIN=$(expr `cat $GAMESDELETE | grep -o : | wc -l` + 1)
	while [ $CUIN -ge 1 ]; do
		rm $PSPDIRISO/"`cut -d: -f"$CUIN" $GAMESDELETE`"
		zenity --info --title "It has been deleted successfuly" --text "El juego "`cut -d: -f"$CUIN" $GAMESDELETE`" has been deleted successfuly."
	        let CUIN=CUIN-1
	done
	rm $GAMESDELETE
	fi
}


function funcinit {
if [ -a $GAMESLIST ];
then
        rm $GAMESLIST
fi
if [ -a $GAMESLIST2 ];
then
	rm $GAMESLIST2
fi
if [ -a $GAMESCHOSEN ];
then
	rm $GAMESCHOSEN
fi
if [ -a $GAMESINPSP ];
then
        rm $GAMESINPSP
fi
if [ -a $GAMESINPSP2 ];
then
	rm $GAMESINPSP2
fi
if [ -a $GAMESDELETE ];
then
	rm $GAMESDELETE
fi
if [ "$1" == 1 ]; 
then
	funcgames
	funccheck
else
MEMSTICKFREE=`df -h /mnt/PSP/ | grep -v Disp | awk '{print $4 }'`
if $(zenity --question --title "Space avialable" --window-icon=$ICON --text "Memory Stick Pro Duo : $MEMSTICK
Free Space : $MEMSTICKFREE
Do you want to delete some games?")
then
	funcborra
	funcgames
	funccheck
else
	funcgames
	funccheck
fi
fi
}

function funcgames {

####################################### CARGA DE JUEGOS ####################################
cd $PSPISO
for i in *.*; do
	echo "$i $(expr `7z l $i | grep : | awk '{print $4 }'` / 1000000)MB check" >> $GAMESLIST
done
jou=`cat $GAMESLIST | wc -l`
head -n $[ $jou - 1 ] $GAMESLIST > $GAMESLIST2
tail -n 1 $GAMESLIST | awk '{print $1,$2}' >> $GAMESLIST2
rm $GAMESLIST
#############################################################################################

######################################## ESCOGER JUEGOS ###############################################
MEMSTICKFREE=`df -h /mnt/PSP/ | grep -v Disp | awk '{print $4 }'`
files=$(zenity --list --title "Select games, MAX: $MEMSTICKFREE" --checklist --column="Check" --column="Games" --column="Size" "" `cat $GAMESLIST2 | sed -e 's,.7z, ,g'` --window-icon=$ICON --separator=":" --width="600" --height="500")
if [ -z $files ];
then
	sync | zenity --progress --window-icon=$ICON --title "Closing.." --pulsate --auto-close
	exit
else
echo $files > $GAMESCHOSEN
rm $GAMESLIST2
fi
#######################################################################################################
}

function funccheck {
######################################## COMPROBAR ESPACIO ############################################
cd $PSPISO
MEM=0
CUM=$(expr `cat $GAMESCHOSEN | grep -o : | wc -l` + 1)
while [ $CUM -ge 1 ]; do
        MEM=$[$MEM + $(7z l `cut -d: -f"$CUM" $GAMESCHOSEN`.7z | grep : | awk '{print $4 }')]
        let CUM=CUM-1
done
MEM=$[ $MEM / 1000000 ]
MEMSTICKFREES=$(df -h /mnt/PSP/ | grep -v Disp | awk '{print $4 }' | cut -c1-3)
if [ $MEMSTICKFREES -lt $MEM ]; then
	if $(zenity --question --window-icon=$ICON --title "Not enough Space" --text "You need to free $[ ($MEM - $MEMSTICKFREES)]MB, 
Continue?")
	then
		funcborra "$[ ($MEM - $MEMSTICKFREES)]MB"
		funccheck
	else
		funcinit 1
	fi
else
	zenity --info --text "You have enough free space"
	funccopy
fi

}

function funccopy {
	CU=$(expr `cat $GAMESCHOSEN | grep -o : | wc -l` + 1)
	cd $PSPISO
	while [ $CU -ge 1 ]; do
	        file-roller -e $PSPDIRISO "`cut -d: -f"$CU" $GAMESCHOSEN`".7z
	        let CU=CU-1
	done
	rm $GAMESCHOSEN
	sync | zenity --progress --window-icon=$ICON --title "Syncing.." --pulsate
}

if $(zenity --question --window-icon=$ICON --title "Change games of your PSP" --text "Do you want to change your PSP Games?")
	then
		funcinit
	else
		exit
	fi

And that's it. Now, you should have your PSP Games (ISO's) in your PSP =). I've wrote the pspsave.sh because my Memory Stick sometimes does not work correctly and I've lost my savegames once,but it won't happen again :P.


Mounting and copying files to PSP/Memory Stick Manually

1. First of all, we need Mass-Storage support for USB devices compiled in kernel (Dont forget to include scsi suport and to modprobe sd_mod and usb_storage)

   <M>   USB Mass Storage support

2. Add this line to your fstab file

File: /etc/fstab
...
/dev/sda1  /mnt/PSP  vfat  noauto,noatime,users,shortname=win95,check=s  0 0

With this, we can mount and use Memory Sticks under Linux without a problem. We can also copy EBOOT files to upgrade your Firmware.

We can do this with the command line too:

# mount -t vfat -o shortname=win95,check=s /dev/sda1 /mnt/PSP

Configure you Gentoo BOX to play over internet with a PCI Wireless Card

1. This uses the xLink Kai(kaid).

XLink Kai is a global gaming network - bringing together XBox, Playstation 2,
Gamecube and PSP users, in oneintegrated community. It is software running on
your PC or Macintosh that allows you to play system-link enabled games online 
for free. Kai is the only service that is not console specific, and
boasts one of the friendliest communites available.

Setup Gentoo BOX, for Wireless gaming

I have sucess with Wipeout pure, but Burnout lost connection! Lets GO!

  1. I using Gentoo 2005.1 with net-wireless/wireless-tools
  2. I using: KAID 7.0.0.5 and /etc/kaid.conf
  3. jKaiUI like Client
  4. I not using /etc/conf.d/wireless
  5. My PCI wireless card is a encore with kernel module r8180 from net-wireless/rtl8180
    1. I using r8180 kernel module net-wireless/rtl8180
    2. There is a list of compatible pci cards here
Code: lspci
   Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC
  1. Use these lines in your /ect/conf.d/net:
File: /ect/conf.d/net
   #We need AD-HOC mode for this to work
   mode_wlan0="Ad-Hoc"
   
   #Set any IP address to you card
   config_wlan0=("192.168.8.1")

   #Use same channel in your PSP Device
   channel_wlan0="1"

   #Here you set the ESSID of your PSP Device, note there is one ESSID for each game!
   #NFSU Rivals
   essid_wlan0="PSP_AULUS10007_L_"
   #BurnOut Legends
   #essid_wlan0="PSP_AULES00125_L_BOUTLLOB"

   #Your Ethernet NIC, connected to a switch, modem, ...
   #config_eth0=( "dhcp" )
   config_eth0=( "192.168.254.1 netmask 255.255.255.0" )
   routes_eth0=( "default via 192.168.254.254" )


How to get the ESSID from PSP/Game

Put the UMD game into the PSP, start the game and enter Multiplayer mode. Now scan for the ESSID using iwlist.

Code: iwlist wlan0 scanning
   wlan0 Scan completed :
   Cell 01 - Address: 02:13:66:ED:DC:BF
   ESSID:"PSP_AULES00125_L_BOUTLLOB"
   Mode:Ad-Hoc
   Frequency:2.412 GHz (Channel 1)
   Bit Rate:1 Mb/s
   Bit Rate:2 Mb/s
   Bit Rate:5.5 Mb/s
   Bit Rate:11 Mb/s
   Quality=91/100 Signal level=-53 dBm Noise level=-256 dBm
   Encryption key:off

The line ESSID:"PSP_AULES00125_L_BOUTLLOB" shows the ESSID for the PSP/game pair. Use this ESSID in your /etc/conf.d/net and restart the interface. In this case, wlan0.

/etc/init.d/net.wlan0 restart

Setup KAID client

Use a config file like this:

File: /etc/kaid.conf
 Verbosity = 3
 UIBind = :34522
 OrbPort = 34525 
 EngineBind = :5000
 EnginePAT = 0
 SniffDevice = wlan0
 MacLearningMode   = Auto
 IgnoreMacs =
 ConsoleMacs =
 ConfigURL = www.teamxlink.co.uk/connector/clientgetconfig.php
 Username = Anunakin
 Password = XXXXXXXXX
 AutoLogin = 0
 XBoxHomebrew = 0 

Notes:

Forward your tcp/ip packets to internet

File: /etc/conf.d/local.start
 iptables -F
 iptables -t nat -A POSTROUTING -j SNAT -o eth0 --to 192.168.254.1
 echo 1 > /proc/sys/net/ipv4/ip_forward

On-line play

1. Start kaid

# kaid

2. Start kaid GUI

# javaws jKaiUI

3. Enter the specific room for your PSP game on the xLink network using the kaid GUI.

4. Load the game on your PSP and enter multiplayer mode, the kaid GUI must shows the MAC Address of PSP Device.

Converting Video files to play in PSP

The media-video/ffmpeg tool does everything we need to convert videos to play on PSP devices.

1. Emerge the lastest version of ffmpeg with the aac flag

#echo "media-video/ffmpeg ~x86" >> /etc/portage/package.keywords
#echo "media-video/ffmpeg aac" >> /etc/portage/package.use
#emerge -pv ffmpeg

2. Convert the video to PSP format

#ffmpeg -i Video.avi -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240 M4V00001.MP4

2.1. The widescreen resolution of 368x208 is also known to work.

2.2. Remember, we must use names like M4V00001.MP4, M4V00002.MP4, ...

2.3. Files which are encoded using "AVC" profiles should have names of the format "MAQ#####.MP4", where "#" represents a numeral. In contrast, files encoded using "SP" profiles should have names of the format "M4V#####.MP4". (Quote of Slordak at pspvideo9.com forum)

3. Extract the thumbnail image

#ffmpeg -y -i Video.avi -f image2 -ss 5 -vframes 1 -s 160x120 -an M4V00001.THM

3.1. Use the same output file name, but replace the file extension with THM.

4. Mount PSP device

#mount -t vfat -o shortname=win95,check=s /dev/sda1 /mnt/PSP

5. Make the folder, if inexistant, to put your videos

#mkdir /mnt/PSP/MP_ROOT/100MNV01

6. Copy the file

#cp M4V00001.MP4 /mnt/PSP/MP_ROOT/100MNV01/

Converting all your videofiles at once

Use this script for converting a large collection of movie files at once. I wrote and use this script for a while now -- Jonathan S.

Updated and enhanced because the script was broken. This script has actually been tested with a PSP with firmware v3.x. -- Dominicus

File: make_psp_movie.sh
#!/bin/bash
#script name: make_psp_movie.sh
if [ $# == 0 ]
then
    echo "Use: make_psp_movie video1 video2 video3 ..."
fi
target="/tmp/`echo $LOGNAME`/pspmovies/MP_ROOT/100MNV01"
mkdir -p "$target"
for m in "$@"
do
    echo "-------------------"
    echo "Start converting $m"
    echo "-------------------"
    output="10001"
    while [ -f "$target/M4V${output}.MP4" ]
    do
        let "output += 1"
    done
    #generate video
    #If "-r 29.97" does NOT work try "-r 14.985"
    ffmpeg -i "$m" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240  "${target}/M4V${output}.MP4"
    #generate thumbnail
    ffmpeg -y -i "$m" -f image2 -ss 5 -vframes 1 -s 160x120 -an "${target}/M4V${output}.THM"
    #list the files that were just generated
    ls -l "${target}/M4V${output}.MP4" "${target}/M4V${output}.THM"
done
echo
echo "---------------------------------------------------------------------------"
echo "You will find any newly generated PSP videos in:"
echo "     ${target}"
echo
echo "Please copy them to your PSP's 'MP_ROOT/100MNV01/' folder."
echo
echo "Note: if that folder doesn't already exist, just create the folders first."
echo "---------------------------------------------------------------------------"

Now move to your movie collection and enter the following to batch convert versions of your videos to PSP format:

find -type f -exec ./make_psp_movie.sh "{}" ";"

Pick up your PSP movies at /tmp/USER/pspmovies

Software to convert video files

PlayStation Portable Video Converter (pspvc) http://pspvc.sourceforge.net

It's a GTK+ ffmpeg front-end.

http://pspvc.sourceforge.net/images/capture.png http://pspvc.sourceforge.net/images/capture2.png

This software needs an ebuild which can be found at http://pspvc.sourceforge.net/#download

Development

See the article HOWTO_PSP_Development

Retrieved from "http://www.gentoo-wiki.info/HOWTO_PSP"

Last modified: Fri, 05 Sep 2008 11:06:00 +0000 Hits: 37,881