Advertising (This ad goes away for registered users. You can Login or Register)

PSVita homebrew packaging standards discussion

Rejuvenate is a native homebrew platform for PS Vita. Read more about Rejuvenate here.
hgoel0974
Retired Mod
Posts: 2155
Joined: Mon Jul 23, 2012 11:42 pm
Location: New York

PSVita homebrew packaging standards discussion

Post by hgoel0974 »

Since menu support calls for more standardization regarding homebrew paths and icons, while we can just use the PSP formats, they're obsolete and it'd be better to take this opportunity to decide on new future proof standards based on recent design principles.

Currently, the things we need to decide on:
  • Homebrew information format:
    • how should the homebrew name and metadata be stored? (XML, PARAM.SFO etc)
    • package format, PBP was nice, but on the Vita it might be more convenient to go with Zip compressed archives
    • icon resolution, the usual one icon and one background image? background image at native resolution, icon at 256x256 for now? (if we use zip, this should be extensible)
  • Path formats
    • PSM and Unity PSM have different root paths
    • VHL can be made to hook functions that take paths and translate the path correctly
    • PSM has a 6 directory depth limitation, although this can likely be bypassed using certain methods
    • two folders in /Documents/ PLUGINS and APPS
      • PLUGINS contains all plugins along with plugin configurations
      • APPS contains a folder for each homebrew along with the homebrew inside
      • MENU.VELF is stored at /Documents/ for the menu
  • Function calls
    • VHL has WIP multitasking support
    • We don't know of any functions to suspend other threads
    • a call to VHL once per loop in the application event loop would allow VHL to automatically suspend and even exit the homebrew if required, another option would be to have VHL hook Vblank
    • Exiting - should homebrew be required to have an exit option of their own so execution returns to the menu? or should there be a VHBL like system where a thread constantly checks for a key combination, this ties in directly with the requirement to make calls to VHL
  • Memory management
    • VHL will eventually automatically handle memory management, but if the menu isn't exited, it'll take up extra resources, however if it's unloaded, we can't have a clean and fast means of pausing a homebrew and returning to the menu.
I would like for us homebrew devs to decide on what solution would be best for each of these points, so appropriate tools can be developed along with menus and homebrew.

It's very likely I've missed some critical things, so please feel free to let me know if there's anything else we need to decide on.

// smithsf0x
// Sticky Thread
Advertising
"If the truth is a cruel mistress, then a lie must be a nice girl"
Orion90
Posts: 35
Joined: Wed May 14, 2014 10:53 am

Re: PSVita homebrew packaging standards discussion

Post by Orion90 »

I think that the homebrew name and metadata should be stored using PARAM.SFO,as format I like zip format :)
Advertising
PSVITA 1000 Wifi-3.36 ARK-3/VHBL
PSP 2004 SLIM-Pandora kit+6.61 ME 2.3
PS3 SLIM-CFW 4.65.2 REX COBRA/REBUG
XBOX 360 SLIM-RGH
NINTENDO WII-SOFTWARE MOD
NDS/DSI XL-R4
Xeeynamo
Posts: 25
Joined: Fri Feb 24, 2012 6:33 pm
Location: Italy
Contact:

Re: PSVita homebrew packaging standards discussion

Post by Xeeynamo »

About the homebrew format:
1) PARAM.SFO. It's the same format used from Sony Playstation's OS and it's convenient to continue to use it. XML is a good idea because it's easier to edit, but it requires parsing and can be a little slower and harder to manager. The best idea (imho) is to create an XML2SFO that it's called during homebrew building.
2) Most of modern OS install applications from PK files (APK, XAP, IPA etc), so I vote for zip with a custom format that we can call PBP2. The homebrew can be installed as PBP2 or extracted to its specified folder where all data and settings can be found (this will allow faster access).
3) PNG 256x256 it's the best solution. Live area icons are squares: if one day we will be able to port our homebrews to live area, it will be easy to scale our square icons to fit Vita's resolution.
bodega
Posts: 187
Joined: Sat Mar 22, 2014 11:53 am
Location: Rome

Re: PSVita homebrew packaging standards discussion

Post by bodega »

in my opinion you should use the same structure that sony use on psvita pkg, pack in a pkg with old keys and add to your menu a function to extract it.
sorry 4 my bad english :)

Follow me on Twitter erBodega
smithsf0x
Moderator
Posts: 265
Joined: Sat Jan 31, 2015 3:37 pm
Location: Görmänie

Re: PSVita homebrew packaging standards discussion

Post by smithsf0x »

The Hombrew should be a uncompressed .ZIP file, renamed to .PBP2 (great idea Xeeynamo ¡), with the following structure:

.PBP2
  • - META.DATA
    - HomeBrew.elf
    - icon.png
    - background.png
    - data/


Where is META.DATA some sort of PARAM.SFO file but not as complicated, icon.png a 256x256 image, background.png a full resolution image and data/ a folder if the homebrew uses files (like files for a game etc.).

For the Back-To-Loader-Function we have a few options. But I would rather use a standardized exit_function than a standardized button combination.
Image
iCEQB
Posts: 57
Joined: Thu Jan 16, 2014 3:54 pm

Re: PSVita homebrew packaging standards discussion

Post by iCEQB »

I'm no dev, but I would recommend to use Sonys file structure, jsut like the one we can see in the extracted PSM Unity pkg from mr.gas.
Because, if one day we get a CFW or something, we could just copy the same homebrew to ux0:\APPS and use it w/o waiting for devs to convert them to the proper structure and launch them from the live area.
yifanlu
Guru
Posts: 760
Joined: Sun Mar 11, 2012 6:42 am
Contact:

Re: PSVita homebrew packaging standards discussion

Post by yifanlu »

There's a reason UVL was designed to load SCE ELFs rather than a custom executable format (like .3dsx). That's because in theory any homebrew that UVL can run will also be loadable by the system loader. That means when we get a kernel exploit, there doesn't need to be any recompilation.

So if we wish to keep this theme, the format should also fit with sony's packaging format. That means LiveArea XML for everything. I don't want to use a custom format because it would go unused as soon as a kernel exploit comes out. But if we repurpose existing LiveArea and SFO stuff in a way where after we get a CFW all you have to do is install the homebrew with package installer (sig patched), that would be the best route.
Omega2058
Developer
Posts: 246
Joined: Tue Sep 28, 2010 4:27 am
Contact:

Re: PSVita homebrew packaging standards discussion

Post by Omega2058 »

Sticking with the official structure would be ideal. Using a standard exit function would be fine too.

Having a button combination for the menu wouldn't be a good idea especially if the homebrew uses said combination as well.
King Clyde
Posts: 112
Joined: Sat Jun 27, 2015 4:09 pm

Re: PSVita homebrew packaging standards discussion

Post by King Clyde »

yifanlu is 100% correct, if we look at what happened with the PSP there are a lot of cool homebrews from when the PSP first came out that we can no longer play anymore on current PSP firmwares.

I had an idea a while back how we could package it, essentially its using the PSP as an example
My Idea
The PSP had a folder on the root of the memory stick called "ISO" where people put their backups and it works so why fix something that's not broken? So; instead of an ISO folder we could have an "ELF" folder.

This would work perfectly as we have an EML Generator that allows us to write to the memory card.

Instead of having to separate and hex edit files why not just make a folder in this format:
/ELF/"Name of Homebrew"/"App Name".ELF

Then compress it into a ".ZIP" file

Using "EML Generator" select "Name of Homebrew".ZIP and set the path as blank. (So its path is ux0:/)

Then the menu could scan for .ZIP archives on the root of the PS Vita memory card extract them and after extraction delete them.

After that it could scan ux0:/ELF/ for ".ELF" applications.

The same thing could work for installing roms just set the ".ZIP" folders like so: /ELF/"Name of Emulator"/Roms/


We could probably use the same concept as described above with Plugins, Apps, etc. due to its simplicity.

We should use data in a format so that when the time comes, we just put the homebrew in a package file so it can be used by the live area with as little configuration as possible.

So, how about during the build process it generates both a META.DATA as well as a LiveArea XML file (as suggested by yifanlu) that way everything is included so if you want to use it in the LiveArea. If you decide to place it in a bubble the LiveArea will just ignore the META.DATA anyways and the fact that its being generated during the build process doesn't make the individual developing the homebrew need to do any additional work.

Personally, I think this would work out perfectly.

For the standard exit, how about a button combination, something simple like: "Hold the L + R button for 15 seconds to exit."
fate6
Big Beholder
Posts: 7599
Joined: Fri Mar 09, 2012 1:18 am
Location: [fate6@Canterlot ~]$

Re: PSVita homebrew packaging standards discussion

Post by fate6 »

Button combo needs to b kill, All homebrew should have an exit option IMHO.
Image
anon wrote:If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
Locked

Return to “Rejuvenate”