Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

PSXPackager PSP: Difference between revisions

From GameBrew
(Created page with "{{Infobox PSP Homebrews |title=PSXPackager |image=psxpackagerpsp.png |description=A utility to convert Playstation disc images in various formats to PBP format and back. |author=RupertAvery |lastupdated=2023/10/13 |type=PC Utilities |version=1.6.3 |license=MIT |download=https://dlhb.gamebrew.org/psphomebrew/psxpackagerpsp.7z |website=https://www.reddit.com/r/Roms/comments/qlu2uc/psxpackagergui_beta/ |source=https://github.com/RupertAvery/PSXPackager |donation=https://git...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
|title=PSXPackager
|title=PSXPackager
|image=psxpackagerpsp.png
|image=psxpackagerpsp.png
|description=A utility to convert Playstation disc images in various formats to PBP format and back.
|description=Convert Playstation disc images in various formats to PBP format and back.
|author=RupertAvery
|author=RupertAvery
|lastupdated=2023/10/13
|lastupdated=2023/10/13
|type=PC Utilities
|type=File Operation
|version=1.6.3
|version=1.6.3
|license=MIT
|license=MIT
Line 14: Line 14:
}}
}}
{{#seo:
{{#seo:
|title= (PC Utilities) - GameBrew
|title= (File Operation) - GameBrew
|title_mode=append
|title_mode=append
|image=psxpackagerpsp.png
|image=psxpackagerpsp.png
|image_alt=PSXPackager
|image_alt=PSXPackager
}}
}}
PSXPackager is a utility that allows you to convert Playstation disc images in various formats to PBP format and back. It is a port of the popstation-md C source to C#. There is a command-line executable available for Windows, Linux, and OSX, and a Windows-only GUI. The GUI allows you to select and process several images in a queue (Batch mode).
PSXPackager is a utility that allows you to convert PlayStation disc images in various formats to PBP format and back.  


== Features ==
It is a port of the popstation-md C source to C#.  
* Convert .BIN + .CUE or .IMG to .PBP
* Extract .PBP to .BIN + .CUE file
* Supports conversion of .7z, .zip, .rar files to .PBP
* Supports merging of single-disc, multi-track .BIN + .CUE into one .BIN + .CUE
* Supports writing multi-track CUE information to PBP for audio
* PBP Compression levels from 0 to 9
* Supports writing multi-disc PBP using .m3u files
* Supports extracting multi-disc PBP
* Windows/Linux/OSX CLI
* GUI with PSX2PSP-like interface and batch processing


== Usage ==
There is a command-line executable available for Windows, Linux, and OSX, and a Windows-only GUI. The GUI allows you to select and process several images in a queue (Batch mode).
PSXPackager requires .NET 6.0 Runtime or above.


The basic usage of PSXPackager accepts the file or path to convert.
'''Note:''' Requires .NET 6.0 Runtime or above.


<pre>psxpackager -i &lt;input_path_or_file&gt; [-o &lt;output_path_or_file&gt;]
== Features ==
Copy</pre>
* Convert .BIN + .CUE or .IMG to .PBP.
The <code>-i</code> or <code>input</code> parameter is required. It specifies a path to a file, or a directory and a wildcard expression. If a wildcard expression is used, it will process all matching files in the directory.
* Extract .PBP to .BIN + .CUE file.
 
* Supports conversion of .7z, .zip, .rar files to .PBP.
The application will assume that you want to convert any image to a PBP, and any PBP to a .BIN + .CUE.
* Supports merging of single-disc, multi-track .BIN + .CUE into one .BIN + .CUE.
 
* Supports writing multi-track CUE information to PBP for audio.
The command:
* PBP Compression levels from 0 to 9.
 
* Supports writing multi-disc PBP using .m3u files.
<pre>psxpackager -i &quot;Final Fantasy VII - Disc 1.cue&quot;
* Supports extracting multi-disc PBP.
Copy</pre>
* Windows/Linux/OSX CLI.
will process <code>Final Fantasy VII - Disc 1.bin</code> and <code>Final Fantasy VII - Disc 1.cue</code> and output <code>Final Fantasy VII - Disc 1.pbp</code>.
* GUI with PSX2PSP-like interface and batch processing.
 
The <code>-o</code> or <code>output</code> parameter is optional. It specifies the folder where the the converted or extracted files will be placed. If not specified, the folder specified on the input is ued.
 
If the input is a file and the output is also a file, the output will be renamed, instead of reusing the input filename.
 
=== Options ===
 
<pre>  -i, --input                (Group: input) The input file or path to convert. The filename may contain wildcards.
 
  -o, --output              The output path where the converted file(s) will be written.
 
  -l, --level                (Default: 5) Set compression level 0-9, default 5.
 
  -r, --recursive            Recurse subdirectories
 
  -d, --discs                A comma-separated list of disc numbers to extract from a PBP.
 
  -v, --verbosity            (Default: 3) Set level of output messages. 1 = Files, Errors and Warnings only, 2 = No
                            Info-level messages, 3 = All messages (default), 4 = Include timestamps
 
  -x                        If specified, overwrite a file if it exists, otherwise ask confirmation.
 
  -s, --skip                If specified, will skip existing files.
 
  -f, --format              (Default: %FILENAME%) Specify the filename format e.g. [%GAMEID%] [%MAINGAMEID%] %TITLE%
                            (%REGION%) or %FILENAME%
 
  -g, --log                  If specified, log messages to a file.
 
  --extract                  If specified, extract resources using the path specified by resource-format. See README for
                            more details.
 
  --import                  If specified, import resources using the path specified by resource-format. See README for
                            more details.
 
  --generate                If specified, create empty resources folder specified by resource-format. See README for
                            more details.
 
  --resource-format          The format to use with extract/import/generate. See README for more details.
 
  --resource-root            The path where resource folders will be located. If not specified, the path will be the
                            same as the input file
 
  --help                    Display this help screen.
 
  --version                  Display version information.
Copy</pre>
 
=== Convert a .BIN, .CUE, .ISO, .IMG or archive to a .PBP ===
PSXPackager supports several input formats. Simply pass the path to the archive, CUE sheet, or image with the <code>-i</code> parameter.
 
<pre>psxpackager -i &lt;path_to_file&gt; [-o &lt;output_path&gt;] [-l &lt;compression_level&gt;] [-y]
Copy</pre>
The output path is optional. If not specified, the path of the input file will be used.
 
PSXPackager will prompt if a file exists before overwriting it. Use the <code>-x</code> argument to overwrite all files in the output directory.
 
Set the compression level to a value from 0 to 9, with 0 being no compression and 9 being the highest compression level. If not specified, it will default to 5.
 
PSXPackager can automatically extract files from compressed files (archives) anc convert the contents into a PBP. The following formats are supported:
 
* .zip
* .7z
* .rar
* .tar
* .gz
 
Archives will be decompressed to a temporary folder in <code>%TEMP%\PSXPackager</code>, and will be cleaned up on exit.
 
=== Extract a .PBP to a .BIN + .CUE ===
PSXPackager checks the file extension to decide whether to extract or convert, so the syntax remains the same. The output will always be a <code>.bin</code> + <code>.cue</code>.
 
Extracting from Multi-disc PBPs are supported. Specify the discs to extract with the <code>-d</code> or <code>--disc</code> option, which takes a comma-separated list of disc numbers to extract, e.g. <code>-d 1,2</code>. If this option is not specified, all discs will be extracted.
 
<pre>psxpackager -i &lt;path_to_pbp&gt; [-o &lt;output_path&gt;] [-d &lt;list_of_discs&gt;]
Copy</pre>
 
=== Filename formatting ===
Use the <code>-f</code> or <code>format</code> option to specify the format of the output filename based on the information found on the disc (Sony GameID) and the <code>gameInfo.db</code> file.
 
This allows you to generate standardized output filenames that can include the GameID e.g SCUS-94163, the region (NTSC/PAL) and the game name.
 
By default, it will use <code>%FILENAME%</code>, i.e. the input filename as the output filename.
 
See [https://github.com/RupertAvery/PSXPackager#formatting Formatting] for more info.
 
=== Merging Multi-Track Games ===
Some games such as Tomb Raider use audio tracks as background music. These are usually extracted by disc rippers as separate .bin files. They usually come with a .cue file that lists the .bins in order and specifies how long each track is.
 
PSXPackager will automatically merge multi-bin discs before converting to PBP as long as you pass in the .cue file (not the first .bin file). Previously you would need to use CDMage or some other tool to merge multi-bins.
 
The resulting PBP file will contain the audio tracks as disc tracks and you will be able to play your game on your PSP or emulator with music.
 
=== Creating Multi-disc PBPs ===
The PBP format can contain more than one disc, and this is supported by PSXPackager. This allows you to merge a multi-disc game such as Final Fantasy VII (3 discs) into a single PBP.
 
To do this from the command line, first create an <code>.m3u</code> file containing a list of the discs in the order you wish them to appear in the PBP.
 
For example, create a text file with the following contents and save as <code>Final Fantasy VIII.m3u</code>
 
<pre>Final Fantasy VIII - Disc 1.cue
Final Fantasy VIII - Disc 2.cue
Final Fantasy VIII - Disc 3.cue
Copy</pre>
Call <code>psxpackager</code> with the <code>.m3u</code> as the input file.
 
<pre>psxpackager -i &quot;Final Fantasy VIII.m3u&quot; [-o &lt;output_path&gt;]
Copy</pre>
The file <code>Final Fantasy VIII.PBP</code> will be created which contains the three discs in one file.
 
=== Batch Conversion ===
Wildcards are now supported using the <code>-i</code> argument
 
<pre>psxpackager -i &lt;path_containing_files&gt;\&lt;wildcard_filter&gt; [-o &lt;output_path&gt;]
Copy</pre>
This will process all supported files in the folder <code>C:\Roms</code>. Use with caution, as you may be overwriting files that exist.
 
<pre>psxpackager -i &quot;C:\Roms\*.*&quot;
Copy</pre>
This will extract all PBP files in the folder <code>C:\Roms</code> to BIN+CUE.
 
<pre>psxpackager -i &quot;C:\Roms\*.PBP&quot;
Copy</pre>
This will convert all files matching <code>Legend of Dragoon - Disc ?.bin</code> in the folder <code>C:\Roms</code> to PBP.
 
<pre>psxpackager -i &quot;C:\Roms\Legend of Dragoon - Disc ?.bin&quot;
Copy</pre>
If you want faster batch conversion, use the GUI, as it supports multi-threaded processing.
 
=== Customizing PBPs with Resources ===
Resource files are PBP-specific embedded resources that are normally used by the PSP, PSVita or PS3 to display an image or play audio on the XMB when the game is selected. These files usually named ICON0.PNG, PIC0.PNG, PIC1.PNG and SND0.AT3.
 
PSXPackager can extract (<code>--extract</code>) or embed (<code>--import</code>) resource files for a single conversion or batch conversion. To do the latter, the resource files must be located in a specific location.
 
There are two options that let you set how and where the resource files are found.
 
The <code>--resource-format</code> option lets you match a folder based on filename, gameid and other formats. See [https://github.com/RupertAvery/PSXPackager#formatting Formatting]. omitting this option defaults the format to <code>%FILENAME%</code>, meaning the input filename without the extension will be used.
 
The <code>--resource-root</code> option sets the root path of your resource folders. This allows you to separate your disc images from your resource folders. You can omit this option to use the same folder as the input file as the root path of your resource folder.
 
=== Extract Resources ===
Extracts resources from a PBP.
 
<pre>psxpackager -i &lt;path_to_file&gt; --extract [--resource-format &lt;resource format&gt;] [--resource-root &lt;resource root folder&gt;] [-o &lt;output_path&gt;]
Copy</pre>
<code>--resource-format</code> - the format of the folder name to extract the embedded resources to. See [https://github.com/RupertAvery/PSXPackager#formatting Formatting]. If not specified, the default value will be <code>%FILENAME%\%RESOURCE%.%EXT%</code>
 
<code>--resource-root</code> - the root folder where to place the resource folders. Do not specify to place the resource folder next to the input file.
 
For example, if you extract the resources from a <code>Final Fantasy VII (DISC 1).PBP</code> file using the commande below:
 
<pre>psxpackager -i &quot;Final Fantasy VII (DISC 1).PBP&quot; --extract --resource-path %GAMEID%\%RESOURCE%.%EXT%
Copy</pre>
You would have extracted the following files:
 
<pre>SCUS-94163\ICON0.PNG
SCUS-94163\PIC0.PNG
SCUS-94163\PIC1.PNG
Copy</pre>
 
=== Import Resources ===
Imports custom resources into PBP.
 
<pre>psxpackager -i &lt;path_to_file&gt; --import [--resource-format &lt;resource format&gt;] [--resource-folder &lt;resource root folder&gt;] [-o &lt;output_path&gt;]
Copy</pre>
<code>--resource-format</code> - the format of the folder name to import the embedded resources from. See [https://github.com/RupertAvery/PSXPackager#formatting Formatting]. If not specified, the default value will be <code>%FILENAME%\%RESOURCE%.%EXT%</code>
 
<code>--resource-root</code> - the root folder where to start searching for the resource folders. Do not specify to look for the resource folder next to the input file.
 
For example, if you want to build a PBP from a BIN+CUE file and you have the resources next to the file in a folder such as below:
 
<pre>Final Fantasy VII (Disc-1).bin
Final Fantasy VII (Disc-1).cue
SCUS-94163\ICON0.PNG
SCUS-94163\PIC0.PNG
SCUS-94163\PIC1.PNG
Copy</pre>
You can build your PBP using the following command:
 
<pre>psxpackager -i &quot;Final Fantasy VII (Disc-1).cue&quot; --import --resource-path %GAMEID%\%RESOURCE%.%EXT%
Copy</pre>
 
=== Generate Resource Folders ===
This option is provided for the following scenario:
 
You have a bunch of images you want to convert to PBP, and you want to customize all of them. To do this, you will need to generate resource folders, where you will later place the icons and backgrounds you want.
 
This option will create empty folders using the specified format.
 
<pre>psxpackager -i &lt;path_to_file&gt; --generate [--resource-format &lt;resource format&gt;] [--resource-folder &lt;resource root folder&gt;]
Copy</pre>
<code>--resource-format</code> - the format of the folder name to generate. See [https://github.com/RupertAvery/PSXPackager#formatting Formatting]. If not specified, the default value will be <code>%FILENAME%</code>
 
For example, this will generate the empty folder <code>SCUS-94163</code>:
 
<pre>psxpackager -i &quot;Final Fantasy VII (Disc-1).cue&quot; --generate --resource-path %GAMEID%
Copy</pre>
<span id="formatting"></span>
 
=== Formatting ===
<pre>%FILENAME%  - The input filename
%GAMEID%    - The GAMEID of the disc. For multi-disc games, each disc will have a differnt GAMEID.
 
%MAINGAMEID% - The GAMEID of the first disc in a multi-disc game.
 
%TITLE%      - The Disc Title of the game. This will contain the Disc number or other identifier in a mult-disc game.
 
%MAINTITLE%  - The Main title of the game. This will be the actual title of the game.
 
%REGION%    - The game region, i.e. NTSC or PAL.
 
%RESOURCE%  - The resource type. (ICON0, ICON1, PIC0, PIC1, SND0). Only used for resource files
 
%EXT%        - The resource extension. (PNG, AT3). Only used for resource files
 
Copy</pre>
For example, processing <code>Final Fantasy VIII - Disc 1.iso</code> with the following format:
 
<pre>[%GAMEID%] %TITLE% (%REGION%)
Copy</pre>
will generate the filename
 
<pre>[SLUS00892] Final Fantasy VIII - Disc 1 (NTSC).pbp
Copy</pre>
Note that when extracting from a multi-disc PBP PSXPackager will append the disc number to the file format.
 
=== Multi-track .CUE files (Audio tracks) ===
If the input or compressed file has a <code>.cue</code> with multiple tracks, PSXPackager will merge the <code>.bins</code> into a single file in a temporary folder.
 
A new CUE sheet will also be created with all tracks under the merged <code>.bin</code>, and index positions will be updated.
 
This merged <code>.cue</code> file will be used to create a TOC (Table of Contents) for the PBP ISO. This allows audio tracks to be correctly read from the PBP.
 
Temporary files will be deleted when conversion is complete, if the conversion is cancelled, or if an error occurs.
 
The temporary folder location is <code>%TEMP%\PSXPackager</code>.


==Screenshots==
==Screenshots==
Line 294: Line 46:
==Changelog==
==Changelog==
'''v1.6.3'''
'''v1.6.3'''
* Update SharpCompress from 0.33.0 to 0.34.1
* Update SharpCompress from 0.33.0 to 0.34.1.
* Specify FileStream mode (Fixes [https://github.com/RupertAvery/PSXPackager/issues/52 #52])
* Specify FileStream mode (Fixes [https://github.com/RupertAvery/PSXPackager/issues/52 #52]).
'''v1.6.2'''
'''v1.6.2'''
*This version fixes some issues most notably the missing gameInfo.db file.
*This version fixes some issues most notably the missing gameInfo.db file.
'''v1.6.1'''
'''v1.6.1'''
* The framework requirement has been lowered back to .NET 6.0 as this is more prevalent on popular distros as of now.
* The framework requirement has been lowered back to .NET 6.0 as this is more prevalent on popular distros as of now.
* A bug when the output folder name has a dot has been fixed
* A bug when the output folder name has a dot has been fixed.
'''v1.6.0'''
'''v1.6.0'''
* Updated to .NET 7.0, please install the necessary runtime for your OS
* Updated to .NET 7.0, please install the necessary runtime for your OS.
* Fixed the bugs introduced in 1.5 that made the CLI not convert anything at all
* Fixed the bugs introduced in 1.5 that made the CLI not convert anything at all.
* Added checkboxes in GUI Batch list to let you select which files you want to convert
* Added checkboxes in GUI Batch list to let you select which files you want to convert.
* changed how resource-related command line options, see README.MD for more information
* changed how resource-related command line options, see README.MD for more information.
* Linux CLI release, tested in WSL Ubuntu
* Linux CLI release, tested in WSL Ubuntu.
* OSX CLI release, untested
* OSX CLI release, untested.
'''v1.4.1'''
'''v1.4.1'''
*Fix null ScannerID returned for dummy GameEntry for when gameID is not found.
*Fix null ScannerID returned for dummy GameEntry for when gameID is not found.
'''v1.4.0'''
'''v1.4.0'''
* Fixed bug where converting to PBP with no CUE would result in a TOC with an index of 00:02:01 from the default PSAR
* Fixed bug where converting to PBP with no CUE would result in a TOC with an index of 00:02:01 from the default PSAR.
* Change to SevenZipSharp for notifications during extraction
* Change to SevenZipSharp for notifications during extraction.
* Get DiscID from PBP Disc Entry
* Get DiscID from PBP Disc Entry.
* Add output file to tempfiles so cancelling will delete as well
* Add output file to tempfiles so cancelling will delete as well.
* Added option to format filename
* Added option to format filename.
* Add option to generate log
* Add option to generate log.
* Add option for verbosity levels
* Add option for verbosity levels.
* Processing now continues if there are errors
* Processing now continues if there are errors.
'''v1.3.1'''
'''v1.3.1'''
*This release fixes problems when extracting PBPs with more than two discs, as well as error handling when a file does not exist, or when a relative path contains no directory.
*This release fixes problems when extracting PBPs with more than two discs, as well as error handling when a file does not exist, or when a relative path contains no directory.
Line 325: Line 77:
'''v0.3'''
'''v0.3'''
* Bug fixes
* Bug fixes
* Support writing CUE to TOC - audio tracks on multi-bin + CUE files now work
* Support writing CUE to TOC - audio tracks on multi-bin + CUE files now work.
* Support extracting TOC to CUE when extracting PBP to BIN
* Support extracting TOC to CUE when extracting PBP to BIN.
'''v0.2'''
'''v0.2'''
* Compression level can now be set at the command line. Default is 5.
* Compression level can now be set at the command line. Default is 5.
* Compressed files now work as single input (-i parameter) not just for batch inputs
* Compressed files now work as single input (-i parameter) not just for batch inputs.
* PBP Extraction now shows progress rate
* PBP Extraction now shows progress rate.
* PBP Extraction uses input filename for output as input.bin instead of dummy.img
* PBP Extraction uses input filename for output as input.bin instead of dummy.img.


== External links ==
== External links ==
* GitHub - https://github.com/RupertAvery/PSXPackager
* Reddit - https://www.reddit.com/r/Roms/comments/qlu2uc/psxpackagergui_beta/
* Reddit - https://www.reddit.com/r/Roms/comments/qlu2uc/psxpackagergui_beta/
* Github - https://github.com/RupertAvery/PSXPackager

Latest revision as of 14:25, 23 August 2024

PSXPackager
Psxpackagerpsp.png
General
AuthorRupertAvery
TypeFile Operation
Version1.6.3
LicenseMIT License
Last Updated2023/10/13
Links
Download
Website
Source
Support Author

PSXPackager is a utility that allows you to convert PlayStation disc images in various formats to PBP format and back.

It is a port of the popstation-md C source to C#.

There is a command-line executable available for Windows, Linux, and OSX, and a Windows-only GUI. The GUI allows you to select and process several images in a queue (Batch mode).

Note: Requires .NET 6.0 Runtime or above.

Features

  • Convert .BIN + .CUE or .IMG to .PBP.
  • Extract .PBP to .BIN + .CUE file.
  • Supports conversion of .7z, .zip, .rar files to .PBP.
  • Supports merging of single-disc, multi-track .BIN + .CUE into one .BIN + .CUE.
  • Supports writing multi-track CUE information to PBP for audio.
  • PBP Compression levels from 0 to 9.
  • Supports writing multi-disc PBP using .m3u files.
  • Supports extracting multi-disc PBP.
  • Windows/Linux/OSX CLI.
  • GUI with PSX2PSP-like interface and batch processing.

Screenshots

psxpackagerpsp-01.png

psxpackagerpsp-02.png

Changelog

v1.6.3

  • Update SharpCompress from 0.33.0 to 0.34.1.
  • Specify FileStream mode (Fixes #52).

v1.6.2

  • This version fixes some issues most notably the missing gameInfo.db file.

v1.6.1

  • The framework requirement has been lowered back to .NET 6.0 as this is more prevalent on popular distros as of now.
  • A bug when the output folder name has a dot has been fixed.

v1.6.0

  • Updated to .NET 7.0, please install the necessary runtime for your OS.
  • Fixed the bugs introduced in 1.5 that made the CLI not convert anything at all.
  • Added checkboxes in GUI Batch list to let you select which files you want to convert.
  • changed how resource-related command line options, see README.MD for more information.
  • Linux CLI release, tested in WSL Ubuntu.
  • OSX CLI release, untested.

v1.4.1

  • Fix null ScannerID returned for dummy GameEntry for when gameID is not found.

v1.4.0

  • Fixed bug where converting to PBP with no CUE would result in a TOC with an index of 00:02:01 from the default PSAR.
  • Change to SevenZipSharp for notifications during extraction.
  • Get DiscID from PBP Disc Entry.
  • Add output file to tempfiles so cancelling will delete as well.
  • Added option to format filename.
  • Add option to generate log.
  • Add option for verbosity levels.
  • Processing now continues if there are errors.

v1.3.1

  • This release fixes problems when extracting PBPs with more than two discs, as well as error handling when a file does not exist, or when a relative path contains no directory.

v1.2

  • This version has a bug when extracting a PBP with more than 2 discs. Please get the next release.

v0.3

  • Bug fixes
  • Support writing CUE to TOC - audio tracks on multi-bin + CUE files now work.
  • Support extracting TOC to CUE when extracting PBP to BIN.

v0.2

  • Compression level can now be set at the command line. Default is 5.
  • Compressed files now work as single input (-i parameter) not just for batch inputs.
  • PBP Extraction now shows progress rate.
  • PBP Extraction uses input filename for output as input.bin instead of dummy.img.

External links

Advertising: