Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 10, 2012, 01:34:39 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Welcome to PSP-Programming.com
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: **GUIDE** Porting an app to 3.71 M33 and 3.71 M33-2  (Read 7778 times)
RZX15
Full Member
***

Karma: +108/-104
Offline Offline

Posts: 214
7143.72 points

View Inventory
Send Money to RZX15
DUM DUM DUM


View Profile
« on: October 11, 2007, 12:13:50 PM »

Hi all, I just wanted to bring back a helpful guide on how to port an app to 3.71 M33 and 3.71 M33-2.

NOTE: THIS IS NOT MADE BY ME!!!! I BROUGHT THIS FROM PS2DEV TO HERE!!!!!

I just lightly modified it to fit this site more.

I brought this over here because there have been some threads (some of them even mine) about developing on the 3.XX Kernel.

From CpuWhiz on Ps2Dev:

Porting a 1.50 firmware homebrew to 3.xx firmware

3.xx firmwares require your homebrew be in prx format. To get your homebrew in this format, you need to follow a few basic steps:

1. Modify your Makefile - You need to add the following to your Makefile to compile a prx (before the include $(PSPSDK)/lib/build.mak line):
Code:
BUILD_PRX = 1
PSP_FW_VERSION = 371




2. Set your homebrew to user mode - Your homebrew needs to start in user mode. To do this, change the 2rd argument in PSP_MODULE_INFO to 0. For most homebrew you will also need to increase your heap size. The heap size is the amount of memory available to malloc. I set mine to 20mb. The bellow code should be at the top of your main source file (normally main.c).

Code:
PSP_MODULE_INFO("My Homebrew", 0, 1, 0);
PSP_HEAP_SIZE_KB(20480);

Alternatively you can use PSP_HEAP_SIZE_MAX(); if you have a toolchain compiled on or after Sep. 30th, 2007 (revision 2321). This will allocate as big of a heap as it can. Please note you should recompile your entire toolchain (or at least pspsdk and newlib) to use this, otherwise your homebrew will crash with a Exception - Bus error (data).

3. Try running your app - You should now be able to compile your app with a normal make and copy over the EBOOT.PBP per usual. There is no kxploit or % folder for 3.xx firmware. If you are running your application from psplink, you need to run the prx file instead of the elf file or it will not run. At this point your homebrew should run unless you have kernel calls in your code. If your code has kernel calls you will get a 0x8002013C error when you try to start the homebrew. Don't panic, move on to step 4. If your homebrew runs, great, skip step 4.

4. Locate and deal with your kernel calls - You need to figure out what is a kernel call and what isn't. To do this, you can use prxtool -f <prx file>. Here is a example output:
Code:
$ prxtool -f project.prx

... output left out (it's a lot of output) ...
Import 9, Name UtilsForUser, Functions 1, Variables 0, flags 40010000
Functions:
0x79D1C3FA [0x0008CF34] - UtilsForUser_79D1C3FA
Import 10, Name LoadExecForUser, Functions 2, Variables 0, flags 40010000
Functions:
0x05572A5F [0x0008CF3C] - LoadExecForUser_05572A5F
0x4AC57943 [0x0008CF44] - LoadExecForUser_4AC57943
Import 11, Name IoFileMgrForKernel, Functions 1, Variables 0, flags 00010000
Functions:
0x411106BA [0x0008CF4C] - IoFileMgrForKernel_411106BA
Done


If you look at the above output you can see there is a import called IoFileMgrForKernel. This import has one function. Refer to this page: http://silverspring.lan.st/1.5x/kd/iofilemgr.html. Search on the page and you will find that 0x411106BA matches the function sceIoGetThreadCwd. You can now search for this function and either (a) replace the kernel call with user mode code -or- (b) move the kernel call into a kernel mode prx and load that kernel mode prx from your homebrew. Option B is out of the scope of this tutorial so search the forums to figure out how to do this. Option A is the preferable solution unless you have to use a kernel call. I went to the main page http://silverspring.lan.st and clicked on 1.5x firmware. From this page I found sceIOFileManager in the list and clicked on it to get to the above page. A search function would have been nice.

****END GUIDE****

Enjoy!!!
« Last Edit: October 11, 2007, 12:17:38 PM by RZX15 » Logged

FW History= 2.60<2.71<2.80<2.81<2.82<3.03<3.10<3.30<3.40<3.50<1.50<3.40 OE-A<Semi-Brick<1.50<3.40 OE-A<1.50<3.52 M33<3.52 M33-2<3.52 M33-3<3.52 M33-4<3.71 M33-2<1.50<3.71 M33-2<1.50 Forever, PSP Unusable Sad

New PSP Slim!<3.60<3.71<4.01<5.00<5.03<ChickHEN<5.00M33-6

50th Post + Jr. Member on 10/9/07
100th Post + Full Member on 10/12/07

Want to know how to port an app to 3.71 M33 and 3.71 M33-2?

Go Here.

http://www.psp-programming.com/forums/index.php?topic=2897.0


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Read the sentence below.  Your life depends on it.
Read the sentence above.  Your life depends on it.

If you fell for that then man are you gullable!!!


RZX15
Full Member
***

Karma: +108/-104
Offline Offline

Posts: 214
7143.72 points

View Inventory
Send Money to RZX15
DUM DUM DUM


View Profile
« Reply #1 on: February 13, 2008, 07:35:35 PM »

I'll add more examples soon about matching up calls with functions, i've seen lots of threads about this...


(1,000 Views!  No replies...)
Logged

FW History= 2.60<2.71<2.80<2.81<2.82<3.03<3.10<3.30<3.40<3.50<1.50<3.40 OE-A<Semi-Brick<1.50<3.40 OE-A<1.50<3.52 M33<3.52 M33-2<3.52 M33-3<3.52 M33-4<3.71 M33-2<1.50<3.71 M33-2<1.50 Forever, PSP Unusable Sad

New PSP Slim!<3.60<3.71<4.01<5.00<5.03<ChickHEN<5.00M33-6

50th Post + Jr. Member on 10/9/07
100th Post + Full Member on 10/12/07

Want to know how to port an app to 3.71 M33 and 3.71 M33-2?

Go Here.

http://www.psp-programming.com/forums/index.php?topic=2897.0


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Read the sentence below.  Your life depends on it.
Read the sentence above.  Your life depends on it.

If you fell for that then man are you gullable!!!
ernos
C/C++ Developer
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 6
365.40 points

View Inventory
Send Money to ernos

View Profile
« Reply #2 on: March 20, 2008, 05:27:26 AM »

Good to know, thanks alot  Cool

so 1.5 homebrew is not prx? I did not know that.
Logged
Vincent
Mudkips
C/C++ Developer
Hero Member
*

Karma: +76/-2
Offline Offline

Posts: 1384
9999999.99 points

View Inventory
Send Money to Vincent

Me and my 'Vette


View Profile WWW
« Reply #3 on: March 20, 2008, 09:10:51 AM »

You should make this topic a sticky topic in the C/C++ area because that is where everyone will go to ask these questions.
Logged

legendMythe
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 33
1578.97 points

View Inventory
Send Money to legendMythe

View Profile
« Reply #4 on: April 29, 2010, 07:28:07 AM »

ty but i got the error code 8002013c but I never used prxtool i can't even get it install Sad plz help
« Last Edit: April 29, 2010, 08:21:52 AM by legendMythe » Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.156 seconds with 28 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com