PDA

View Full Version : Guide to get into PSP Homebrew



wraggster
June 19th, 2005, 21:43
An hacker whom i respect for his hacks and views has posted some rather cool news on his site and also a great guide for wannabees (like me) to try and do some PSP Development. Heres the news from Liquid ices site ( http://psphacks.blogspot.com/ )

<BLOCKQUOTE>I did it! I've successfully installed the pspdev toolchain, modified nem's hello world code, and even added in some controller functionality to listen for button presses. Once I had some workign code that compiled, I was able to test and tweak it using pspe emulation software. After I was happy with the results I used psp homebrew 9 to automatically make swap exploit files and upload them to my memory sticks. I did the swap trick and like magic I had my first program running on the PSP.

My next trick is to figure out how to import some of the functions and modules. I've played around with stubbing in the functions within the startup.s file, and I'm pretty sure i've got the sceCtrl libs implemented properly in the program.

If anyone knows more information about the sceNet functions please send me some links. I've been looking everwhere to try to figure out how to start the network and make a socket connection. This data would be invaluable to me at this point. Meanwhile I have a lot of work to do to make a standalone version of PSP Home Control 2.0 a reality.

For detailed instructions on how to start writing your own PSP programs, follow the directions on the following URL to install the psp toolchain and eboot conversion tools:
</BLOCKQUOTE>

http://staff.philau.edu/barberej/psp_dev_guide.htm

Heres those instructions too :)

<BLOCKQUOTE>Instructions on how to compile Nem's Hello World source code with ooPo's PSP Toolchain in Linux (or Cygwin)

Open a new console window

mkdir psphome
cd psphome
wget http://www.oopo.net/consoledev/files/psptoolchain-20050613.tgz
tar xvzf psptoolchain-20050613.tgz
cd psptoolchain
su
./toolchain.sh
exit

export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/pspsdk"
export CVSROOT=":pserver:[email protected]:/home/pspcvs"
export PATH="$PATH:$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"

(You can also add the above four lines to your .bash_profile, to save you from typing it in each time you open a new console window.)

cd psphome
mkdir src
cd src
wget http://anon.ug.to/sec/pub/hellopsp_src_Rel1.zip
unzip hellopsp_src_Rel1.zip
cd hellopsp_src

psp-gcc -g -mlong32 -c hellopsp.c
psp-gcc -g -mlong32 -c pg.c
vim startup.s (change $v0 to $2)
mv startup.s startup.S
psp-gcc -g -c -xassembler -O -o startup.o startup.S
psp-ld -O0 startup.o hellopsp.o pg.o -M -Ttext 8900000 -q -o out > hellopsp.map

vim outpatch.cpp

change #include "stdafx.h" to:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

change _tmain to main and _TCHAR to char*

g++ outpatch.cpp -o outpatch
./outpatch out
cd ..
cd ..

mkdir elf2pbp
cd elf2pbp
wget http://www.internalreality.com/elf2pbp3.zip
unzip elf2pbp3.zip
cd src
g++ elf2pbp.cpp -o elf2pbp
cp elf2pbp ../
cd /psphome/src/hellopsp_src/

../../elf2pbp/elf2pbp outp


Now you should have an EBOOT.PBP file. This can be run on a v1.0 firmware PSP, or after unpacking it and renaming the UNKNOWN.PSP file to EBOOT.PBP, you can run it via the #PSPDEV "Swaploit" on v1.5 firmware. </BLOCKQUOTE>

Zeno
June 20th, 2005, 02:05
Hmm since this requires an install of toolchain, I can't try it out on my shell. I'm gonna try it on Cygwin since my linux comp isn't online. Will let you know of results.

[EDIT] Gah, I forgot Cygwin doesn't support su. Hrm.

[EDIT 2] Tested and works. I have just compiled the EBOOT.PBP, yay. 4 years of experience in C and *nix helps. Gonna fiddle around with this.

Alright, first change.

http://img.photobucket.com/albums/v123/rebirthseph/psp_change.jpg

Changed file selector.
http://img.photobucket.com/albums/v123/rebirthseph/select.jpg

Working on images. Done.
http://img.photobucket.com/albums/v123/rebirthseph/psp_image.jpg

Me33
June 20th, 2005, 09:17
Has anyone else run into this problem when trying to setup with cygwin..

It is making BINUTILS (all from the automatic install.sh) when this error happens:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
Configuring in bfd
configure: loading cache ./config.cache
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... Invalid configuration `psp': machine `psp' not recognized
configure: error: /bin/sh ../../bfd/../config.sub psp failed
make: *** [configure-bfd] Error 1
ERROR BUILDING BINUTILS (binutils-2.16 psp)

any help would be appreciated

Zeno
June 20th, 2005, 17:29
I used Cygwin and it built successfully. My only thought is that you may have not installed all the needed packages?

Me33
June 20th, 2005, 20:51
I installed with the setup.exe from cygwin.com then I did the base install and then installed everything from the 'Devel' category, too. What did you guys install to make it work?

Zeno
June 20th, 2005, 22:15
Everything. :)

LAW666
March 8th, 2006, 14:50
will the eboot's work on 2.00?

Kaiser
March 9th, 2006, 03:00
Um this is a really old thread.

Read through the rest of the site before asking something like this

edit: change your avatar to.