Developing for PS3 – Part 2 – Packaging

Disclaimer: As with any guide there is the risk of information becoming outdated and tools deprecated. This is a perfect example of it. The text bellow explains the process I used for packaging homebrew when I was still using a jailbreak device. But since then CFW has become the predominant method for enabling homebrew and at the time of writing this disclaimer no CFW will support the use of the eboot.bin files generated using the executable mentioned bellow in Step 2. At the moment it is my understanding that geohots tools are a necessity if you wish to play your homebrew on CFW.

Another mildly boring but necessary thing that you are going to need to be able to do is package that newly compiled testapp and anything else you make.

You can temporarily get around the need for making installable PKGs by using programs like PS3Load. It didn’t seem to work for me the few times I tried it but I assume it must work in some conditions. Its certainly worth looking into. I had found its Wii counterparts helpful. But in any case your often still going to want or need to package your PS3 homebrew.

As usual I’m sure there are better ways to go about this but this is what I have been doing.

Step 1

Grab a copy of CFWProphet’s PS3 PKG Tool. The latest release of it has been renamed ACID v1.0 and can be found here.

Despite having the same name it should not be confused with CFWProphet’s PS3 Acid CFW. When actually running them both ACID v1.0 and PS3 PKG Tool v0.6 still refer to themselves as PS3 PKG Tool v0.5. I don’t know why it is the way it is.

If you don’t already have and don’t want to make a ps3news.com forum account you can alternatively get the older 0.5 version here.

Step 2

Copy or move “testapp.elf” into the PKG Tool’s folder.

create a shortcut to “make_fself_npdrm.exe”.

Its included with all versions of the PS3 PKG Tool. With “ACID v1.0” it sits in the folder at all times but with “PS3 PKG Tool v0.5” it is only accessible when the tool is running. I assume “make_fself_npdrm.exe” is contained in PS3_PKG_Tool_v0.5.exe and gets extracted when the program runs and then deleted when its shut down. I don’t know why. Similarly I’m unsure why several other files that come with the tool including the MSYS related installers are set to be hidden. There seem to have been a lot of odd choices made in creating the tool. Maybe it was intended to make it seem more organized in some way.

In any case “make_fself_npdrm.exe” is also included with the SDK and should now be located at “C:\usr\local\cell\host-win32\bin”.

Edit the shortcut to add ” testapp.elf EBOOT.BIN” to the end of its target address. Then run the shortcut.

The “EBOOT.BIN” file that should have just been generated is the actual software that will run on your PS3. Inside of the PKG Tool folder create a new folder called “USRDIR” and move “EBOOT.BIN” into it. Any media that your program will use (like 3D meshes or textures) should go into that “USRDIR” folder. Everything in that folder gets included in the final PKG.

Step 3

Start up the PKG Tool and enter 7 to launch the SFO Editor. The editor is fairly self explanatory.

Under “Catagory/Patch” set its category to “HDD Boot Game”.

Under “general Parameters” enter a four letter word first part of the “Title ID” and enter five numbers for the second half. This text will dictate where on the hard drive the package will be installed to. If for example you entered “CUBE” and “66666” then everything in your “USRDIR” folder will show up at “/dev_hdd0/game/CUBE66666/USRDIR/”. This also means that its important that you pick a name that’s unique to the program your packaging. You obviously cant have two programs installed at the same address.

You can enter whatever you want for the “Title (default)”. That is the text that will appear next to the icon in the XMB.

You can use whatever you like as your programs version number but it will cause problems generating the PKG if your inconsistent about what version number your labeling it as.

Don’t forget to tick any/all resolutions and audio formats that you will be supporting.

Save your SFO in the PKG Tool folder as “PARAM.SFO”.

Step 4

Return to the PKG Tool and enter 8 to make the necessary “package.conf” file.

type in 6 random characters
followed by a dash
then enter both parts of the Title ID you used in your SFO (no dash or space between the two parts)
followed by an underscore
followed by two zeros
followed by a dash
followed by 16 random characters.

Hit enter.
It will generate some random numbers.
Hit enter again.

Enter “Free”.

Enter “GameExec”.

Enter the version number of whatever it is your packaging.

If you would like to you could really just do this step in notepad or some other similarly simple text editor. The contents of the “package.conf” file should end up looking something like this.

Content_ID=OPSY4K-CUBE66666_00-1648597256315895
K_Licensee=0x2255AB56E3EE459A011A6167528425F2A22
DRMType=Free
Content_Type=GameExec
Package_Version=1.0

Step 5

Load up your favorite image editor and make a 320×176 PNG and name it “ICON0.PNG”. Place it into the PS3 PKG Tool folder (NOT the “USRDIR” subfolder). This image will be used as the icon in the XMB.

You can also add the following images but they aren’t really necessary.

“PIC0.PNG” 100×560 this image is best suited for a larger title or logo. It fits on screen bellow the horizontal cross media bar and to the right of the vertical one. Unlike with the background you shouldn’t need to worry about parts of this one getting cropped off screen for people with 4:3 TVs. If you include one of these then when its loaded and being drawn on screen the text that says the programs name is turned off.

“PIC1.PNG” 1920×1080 This image is used as the background. Keep in mind when making this one that a non trivial amount of the left and right sides will be cropped off in 4:3 mode.

“PIC2.png” 310×250 I don’t actually know what this image is for and haven’t bothered checking yet. The few games that have one just leave them blank. Feel free to use one and post the results in the comments.

Although retail games tend to use 24bit images for “PIC1.PNG” it supports the use of 32bit PNG files for all of them. This means that you can use alpha channels for all of them. So you can layer the images and leave peoples background themes partially visible.

Its my understanding that “PS3LOGO.DAT” and “SND0.AT3” relate to adding audio and using video in place of the icon. But I haven’t looked into that yet.

Step 6

Return to the PKG Tool one last time and enter 9. If all goes well it should generate an installable PKG for you. Copy it to a USB mass storage device, install it and have some fun toying around with it on your PS3.

Advertisements

10 Responses to Developing for PS3 – Part 2 – Packaging

  1. paul says:

    thank you for this part, i was totally confused about the .elf to the .bin. i thought the .elf files were like the prx’s of the psp… thank you.

  2. Bpear says:

    I got this packaged for 3.55 http://dl.dropbox.com/u/14745788/PS3sdkTestapp.pkg just testing my skills 🙂 thanks for the tutorial

  3. Oxyde says:

    Thanks a lot for this tutorial! It helped me a lot!

    By the way, I tried to make a PKG with more than one .elf, as in the Particle sample from the SDK, where is a .elf for the SPU executable there, but with no success. Have you tried anything like that? Do you know how to build a PKG with more than one elf?

    For now, I’m using the PKG Toolkit GUI-v1.20 to build the packages.

  4. SuperDre says:

    PIC2.PNG is just like PIC0.PNG only it’s shown when 4:3 (SD) is used.

    Also all files have multilanguage:
    just tag one of the following numbers to your default file.
    ex. PIC0.PNG and PIC0_06.PNG (dutch)
    00 Japanese
    01 English
    02 French
    03 Spanish
    04 German
    05 Italian
    06 Dutch
    07 Portuguese
    08 Russian
    09 Korean
    10 Chinese (traditional)
    11 Chinese (simplified)
    12 Finnish
    13 Swedish
    14 Danish
    15 Norwegian
    16 Polish

  5. Roman says:

    i will do everything you have written, but when I run the test program getting error 8001009.
    On my console CFW 4.46 Rogero

  6. Shay says:

    I read a lot of interesting posts here. Probably you spend a
    lot of time writing, i know how to save you a lot of work, there
    is an online tool that creates readable, SEO friendly
    articles in seconds, just search in google – laranitas free content

  7. There’s a misconception that physical activity implies going to the gym and performing
    some serious strenuous exerces for long hours, well, it
    doesn’t have to be that way. Natural remedies include herbal remedies, behavioral therapies,
    relaxation techniques, good lifestyle habits, and ideal sleep hygiene.
    This can be absolutely devastating to your chances
    of coming out of the anxiety attack in a healthy manner.

  8. insanity max 30

    Developing for PS3 – Part 2 – Packaging | ThatOtherDev

  9. index says:

    Very good blog you have here but I was wanting to know if you knew
    of any community forums that cover the same topics discussed in this article?
    I’d really like to be a part of online community where I can get opinions from other experienced
    people that share the same interest. If you have any suggestions, please let me
    know. Bless you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: