help needed building on OS X

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

help needed building on OS X

Post by Trarman »

I've followed the instructions from this page:
http://staff.philau.edu/barberej/psp_dev_guide.htm

and everything worked up until the very last step, using elf2pbp to create the eboot.pbp. That caused a seg fault every time until I found the patch at the end of this thread: http://forums.ps2dev.org/viewtopic.php? ... 72015a6520

So now I was able to compile and link and create a pbp without error, but the resulting eboot.pbp does not run in pspe nor on my psp.

Anyone have some suggestions?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

Does not run as in what? Do you get an error code?
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

Post by Trarman »

Sorry, I should have mentioned that. I get:
"The game could not be started. (800200D9)"
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

What firmware do you have? 1.0/1.5/1.51/1.52?

1.0 and 1.5 these work.

1.51/1.52 we cant get to work... yet
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

Post by Trarman »

Firmware 1.5. I'm using the latest version of PSP Brew to split the eboot.pbp into the two directories and put them on my psp.

Regardless, I would've expected Hello World to work on pspe. My suspicion is there is something wrong with the way I'm linking. Or the patched elf2pbp is mangling the eboot.pbp. Hmm... I'll try pbp-ing my outp binary on a windows machine and see if we can isolate the problem a bit.
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

Post by Trarman »

Followup: Using elf2pbp on Windows makes no difference to the end result whether I convert "out" or "outp". (Had read somewhere in the forums that outpatch is no longer needed? Is that true?) Both created eboot.pbp's hang pspe (so I didn't bother with copying them across to the psp)

So I have to conclude that the problem occurs before I create outp. I saw some confusion over exactly what parameters are needed with the latest toolchain when running psp-ld. Could someone who has done this successfully on OS X tell me what command line they used?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

try this

(from the article)
psp-gcc startup.o hellopsp.o pg.o controller.o -Wl,-Ttext -Wl,8900000 -nostartfiles -o out -lc
Last edited by Agoln on Fri Jul 01, 2005 1:18 am, edited 1 time in total.
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

Post by Trarman »

Followup to Followup: I read in another thread that pspe might not be able to run Hello World afterall. So I copied the eboot.pbp's (both the outpatched and unpatched versions) that I created on Windows to the PSP, and they give the same error as before. So that confirms that my osx version of elf2pbp isn't the problem. Something's wrong with the compiling or linking steps.
Trarman
Posts: 6
Joined: Fri Jul 01, 2005 12:25 am

Success

Post by Trarman »

Success!

For anyone using OS X that is having trouble and finds this thread, here's the exact steps I used:

Follow the instructions from this site:
http://staff.philau.edu/barberej/psp_dev_guide.htm
but don't do any of the manual compilation steps. Just set up the environment, get the source, and make the listed code changes.

Additionally, apply the osx patch to elf2pbp from this thread:
http://forums.ps2dev.org/viewtopic.php? ... ht=elf2pbp

vi startup.S and change .xodata.sceModuleInfo to .rodata.sceModuleInfo

rm *.o
psp-gcc -g -c hellopsp.c
psp-gcc -g -c pg.c
psp-gcc -g -c -xassembler -O -o startup.o startup.S
psp-gcc startup.o hellopsp.o pg.o -nostartfiles -o out -lc
elf2pbp out

The resulting EBOOT.PBP can run on your psp using whatever exploit method works for you.

Thanks for your help Agoln!
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

The instructions you have used are outdated. Compiling in macosx should be as straight forward as: ./configure ; make install

If anyone is new to PSP programming they should consider starting with the examples installed with the sdk, not hellopsp. elf2pbp has now been superceded by pack-pbp. outpatch is not necessary.
Post Reply