Extracting PAC files from a PS2 game like Rumble Roses involves several steps, including dumping the game data, identifying the PAC files, and then extracting them. Below is a script to guide you through this process. This script assumes you have the necessary tools installed, such as ps2iso to handle ISO files and Ps2ndp to extract PAC files.
Prerequisites
PS2 Game ISO: You need an ISO file of Rumble Roses.
ps2iso: A tool to extract files from a PS2 ISO. You can download it from ps2iso.de.
Ps2ndp: A tool to extract PAC files. You can find it on RomHacking.net
7zip: For extracting compressed files.
Step-by-Step Script
1. Extract the ISO
First, we need to extract the contents of the ISO file.
bash
#!/bin/bash
# Variables
ISO_FILE="Rumble_Roses.iso"
EXTRACTED_DIR="rumble_roses_extracted"
# Extract ISO
echo "Extracting ISO file..."
ps2iso -x "$ISO_FILE" -d "$EXTRACTED_DIR"
if [ $? -eq 0 ]; then
echo "ISO extraction successful."
else
echo "ISO extraction failed."
exit 1
fi
2. Identify and Extract PAC Files
Next, we need to identify the PAC files and extract them. PAC files are often found in specific directories, such as SLPM or SLUS for PS2 games. We'll search for these files and extract them using ps2ndp.
bash
#!/bin/bash
# Variables
EXTRACTED_DIR="rumble_roses_extracted"
PAC_EXTRACTED_DIR="$EXTRACTED_DIR/pac_files"
PS2NDP_PATH="./ps2ndp" # Path to ps2ndp executable
# Create directory for extracted PAC files
mkdir -p "$PAC_EXTRACTED_DIR"
# Function to extract PAC files
extract_pac_files() {
local dir=$1
for pac_file in "$dir"/*.pac; do
if [ -f "$pac_file" ]; then
echo "Extracting $pac_file..."
"$PS2NDP_PATH" x "$pac_file" -o "$PAC_EXTRACTED_DIR"
if [ $? -eq 0 ]; then
echo "Extraction of $pac_file successful."
else
echo "Extraction of $pac_file failed."
fi
fi
done
}
# Search for PAC files and extract them
echo "Searching for PAC files..."
find "$EXTRACTED_DIR" -type f -name "*.pac" | while read pac_file; do
dir=$(dirname "$pac_file")
extract_pac_files "$dir"
done
echo "PAC file extraction complete."
3. Combine Scripts
You can combine both scripts into one for convenience.
bash
#!/bin/bash
# Variables
ISO_FILE="Rumble_Roses.iso"
EXTRACTED_DIR="rumble_roses_extracted"
PAC_EXTRACTED_DIR="$EXTRACTED_DIR/pac_files"
PS2NDP_PATH="./ps2ndp" # Path to ps2ndp executable
# Extract ISO
echo "Extracting ISO file..."
ps2iso -x "$ISO_FILE" -d "$EXTRACTED_DIR"
if [ $? -eq 0 ]; then
echo "ISO extraction successful."
else
echo "ISO extraction failed."
exit 1
fi
# Create directory for extracted PAC files
mkdir -p "$PAC_EXTRACTED_DIR"
# Function to extract PAC files
extract_pac_files() {
local dir=$1
for pac_file in "$dir"/*.pac; do
if [ -f "$pac_file" ]; then
echo "Extracting $pac_file..."
"$PS2NDP_PATH" x "$pac_file" -o "$PAC_EXTRACTED_DIR"
if [ $? -eq 0 ]; then
echo "Extraction of $pac_file successful."
else
echo "Extraction of $pac_file failed."
fi
fi
done
}
# Search for PAC files and extract them
echo "Searching for PAC files..."
find "$EXTRACTED_DIR" -type f -name "*.pac" | while read pac_file; do
dir=$(dirname "$pac_file")
extract_pac_files "$dir"
done
echo "PAC file extraction complete."
Running the Script
Save the script as extract_rumble_roses.sh.
Make the script executable:
bash
chmod +x extract_rumble_roses.sh
Run the script:
bash
./extract_rumble_roses.sh
Notes
Ensure that ps2iso and ps2ndp are in your system's PATH or provide the correct paths in the script.
This script assumes that PAC files are not compressed. If they are compressed you will need an additional step to decompress them using a tool like 7zip.
Always ensure you have the legal right to extract and modify files from your games. This script is for educational purposes and personal backup only.