You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Users, Administrators.
Free text:
{{#seo: |title=Vita Homebrew PC Tools (PC Utilities) - GameBrew |title_mode=append |image=retroarchbubblegeneratorvita3.png |image_alt=Retroarch Bubble Generator }} Python script for (semi-automatically) generating custom PS Vita LiveArea Bubbles for your RetroArch ROMS. '''Note:''' No longer updated, please use [[RetroBuilder Vita|RetroBuilder]], which is a lot simpler to use. ==User guide== === Prerequisites === The script runs using [https://www.python.org/downloads/ python3], and only requires <code>Pillow</code> to be installed - check the [https://pillow.readthedocs.io/en/stable/installation.html Installation Documentation] or run the following on your command line: <code>python3 -m pip install --upgrade Pillow</code> It also goes without saying that you need a PS Vita with homebrew installed, [[VitaShell]] is highly recommended for transferring and installing the vpk onto your Vita. Any roms you have should only be games you own and be obtained via legal means. There is one more requisite, which is that your ROMS on your PS Vita need to be sorted by system - so in a folder somewhere you should have subfolders for each system you have ROMS for, and in those folders are your ROM files. E.g: <pre> ux0: └── ROMS/ ├── GBA/ │ └── Pokemon - Fire Red.gba └── NES/ ├── Super Mario Bros.nes └── Tetris.nes </pre> (Keep this folder structure in mind, because we'll shortly be creating a very similar one for the ROM cover arts.) === Setting Up === '''1. Images''' For each ROM you want to create a custom Livearea Bubble for, you need 3 different cover arts: * <code>icon0.png</code>, the Livearea icon itself. * <code>bg.png</code>, the game background once it's openned. * <code>startup.png</code>, the clickable image that launches the game. Since <code>icon0.png</code> is the most important and visible on the Livearea, while <code>bg.png</code> and <code>startup.png</code> are less important and seen less, I've provided some example images in <code>examples/</code> you can use for your own ROMS. A note about the size of the images: They will automatically get resized by the script, so the only thing you need to think about is their aspect ratios because they will get stretched a lot if they're not the correct ratio. <code>icon0.png</code> should be a square - for the rest, check <code>examples/</code>. All your cover art images should be orgainzed in a folder structure which is very similar to the one that stores your ROMS on your Vita - with folders for each system, a subfolder for each ROM and in these folders any cover art images. If an image isn't found in a games folder it will search its parent system folder, then the parent images folder. This means that you can re-use certain images for multiple custom Liveara Bubbles without repeating the image. E.g: <pre> . ├── Bubble Images/ │ ├── GBA/ │ │ ├── Pokemon - Fire Red/ │ │ │ └── icon0.png │ │ └── startup.png │ ├── NES/ │ │ ├── Super Mario Bros/ │ │ │ ├── icon0.png │ │ │ └── startup.png │ │ ├── Tetris/ │ │ │ └── icon0.png │ │ └── startup.png │ └── bg.png └── retroarch-bubble-generator/ ├── settings.yaml ├── main.py └── ... </pre> '''Note:''' The name of the game folder should be the same as the title of the ROM on your Vita. If they are not the same, the script will tell the vpk to open a non-existent ROM file and throw an error. If we were to create a custom bubble for <code>Tetris</code> (apart of the <code>NES</code> system) then the script would use: * <code>Bubble Images/NES/Tetris/icon0.png</code> as it's icon. * <code>Bubble Images/NES/startup.png</code> as it's startup image, and * <code>Bubble Images/bg.png</code> as it's background image. On the other hand, if we created a custom bubble for <code>Super Mario Bros</code> it would have it's own unique icon and startup from the <code>Super Mario Bros</code> folder, but it would use the same background as all the other ROMS. '''2. Settings''' The script needs to be configured with a few more details before it can work correctly and automate a large process of the vpk file creation. An example <code>settings.yaml</code> file is provided in the <code>example/</code> folder and needs to be copied out of it to be detected. You need to go through each setting and configure it to your needs: *<code>paths.images</code> - The path to the folder (relative to the script) containing all the systems, their games and the images that was described above. *<code>paths.vita.cores</code> - This is the path to where all your Retroarch cores are located on the PS Vita - if you're not sure, check the FAQ below for how to find this. Note that "{core}" gets replaced with the system's core you specify by the script. *<code>paths.vita.roms</code> - The path to where all your ROMS are on the PS Vita, sorted by system as previously described. "{system}" gets replaced with the chosen system and {filename} with the games filename. *<code>systems</code> - Here lay all your systems configuration which includes a name, which core it uses (This gets substituted into *<code>paths.vita.cores</code>) and the format of its ROMS (So if I was creating a bubble for <code>Tetris</code> and and the NES's format was <code>{title}.nes</code>, the ROM filename should be <code>Tetris.nes</code>). ===How to use=== Run the script from the command line with the following command: <pre>python3 main.py</pre> The script will automatically detect which systems you've configured in the settings AND which systems there exists a folder for in your images folder, and will let you choose between one of these systems (You can type in either the name of the system or the number next to it). Once you've chosen a system the script reads all the game subfolders within that system and lets you choose one of these (again, you can either type in the name of the game or the number next to it). Now comes the hardest part, which is picking a Title ID. Each Livearea Bubble needs a unique title ID containing only uppercase letters and numbers (the script won't let you type in an invalid ID). For your convience, the script also stores all previously entered title ID's and knows if you've doubled up on the same ID. Here is an extract from [https://github.com/vitasdk/vita-toolchain vita-toolchain] on picking a title ID: "The TITLE id can be anything but it is recommended that you use <code>XXXXYYYYY</code> where <code>XXXX</code> is an author specific identifier and <code>YYYYY</code> is a unique number identifying your homebrew. For example, molecularShell uses <code>MLCL00001</code>." At this point, believe it or not, you're done. Because the script can piece together the path to the core on your Vita and the path to the ROM on your Vita + other things, All thats left for you to do is review the final parameters that the script will present you with and press enter. At this point the script generates the output .vpk file for you to transfer to your Vita via FTP or USB via [[VitaShell]] (or any other prefered method) and install the vpk. ===Skipping the interactive menu=== Also provided is an argument-based interface for generating VPK files. For more information do python3 main.py --help But the basic usage is as follows: # python3 main.py "system" "rom" python3 main.py "GBA" "Pokemon - Fire Red" Note that you must have at least once already gone through the interactive menu and given the ROM an title ID. Also, the <code>system</code> and <code>rom</code> arguments need to be quoted. === FAQ === '''Q. How do I choose a core?''' Through [[RetroArch Vita|RetroArch]], run your rom as per normal and try out which core works best for you, then find it's corresponding file before configuring this script. '''Q. Where do I find the cores?''' By default the cores are located in <code>ux0:app/RETROVITA/</code> and take the form of <code>{core}_libretro.self</code>, but note that <code>ux0:app/RETROVITA</code> is accessable to Retroarch is simply <code>app0</code>. So by default your <code>paths.vita.cores</code> should be <code>app0:{core}_libretro.self</code>. '''Q. A big error comes up when I start the script, something to do with a ParserError in settings.yaml?''' This means that the syntax of your <code>settings.yaml</code> file is incorrect. Check that the lines are indented correctly (check the example for reference). Watch out that a string can't begin with a curly bracket, and the system ROM formats tend to begin with one (e.g. <code>"{title}.nes"</code>), so these need to be wrapped in double quotes. '''Q. The script isn't letting me select a system!''' The system needs to exist as BOTH a folder in your images path and an entry in the <code>systems</code> data in <code>settings.yaml</code>. If one doesn't exist, it won't let you select that system. '''Q. When I try to launch the bubble on my Vita it throws an error!''' Check your core paths, your rom paths, and that your game images folder name in your system folder is the same as your ROM title. ==Screenshots== https://dlhb.gamebrew.org/vitahomebrews/retroarchbubblegeneratorvita3.png == Credits == * [https://www.reddit.com/user/W00lfwang/ u/W00lfwang's] original [https://www.reddit.com/r/vitahacks/comments/hjmn5k/ps_vita_daedalusx64_and_retroarch_custom_bubbles Reddit post] detailing the process for generating custom bubbles. * [https://www.youtube.com/channel/UCjnHt3Hiz7DUzXGwCHY3EWA SayianPrinceVegeta] for making a [https://youtu.be/umg2zbt-ydo YouTube video] documenting the process. This was a big help, and praise the YouTube Algorithm lord for recommending me this in the first place and inspiring me to automate the process. * The team behind [https://github.com/vitasdk/vita-toolchain vita-toolchain] which is included in this repo and allows for the creating of the VPK files. * Also included here is [https://pngquant.org/ pngquant] which compresses the images for use on the Vita. * And credit to many other amazing open source projects which make this all possible in the first place like to [https://github.com/Rinnegatamante Rinnegatamante] and to the [https://www.retroarch.com/ Retroarch] team. == External links == * GitHub - https://github.com/histefanhere/retroarch-bubble-generator * Reddit - https://www.reddit.com/r/vitahacks/comments/kaca8k/script_for_generating_custom_retroarch_livearea/
Advertising: