Overview
The ps3load tool allows you to load and run PS3 SELF executables over a TCP network connection. This enables rapid development cycles without creating PKG files or using USB drives.
Requires ps3load network listener running on your PS3 (included with PSL1GHT homebrew).
Why Use ps3load?
Fast Iteration Load executables in seconds instead of creating PKGs and transferring files.
Development Workflow Test changes immediately without packaging overhead.
Network Debugging Stream stdout/stderr from your PS3 application to your development machine.
Automatic Compression Transparent zlib compression reduces transfer time.
Prerequisites
On Your PS3
Install Network Listener
Run a homebrew application that includes the ps3load listener (most PSL1GHT homebrew includes this).
Note PS3 IP Address
Find your PS3’s IP address in network settings or use a fixed IP.
Ensure Network Connectivity
Your development machine and PS3 must be on the same network.
On Your Development Machine
The ps3load tool is built as part of PSL1GHT toolchain installation.
Setup
# Set PS3LOAD to your PS3's IP address
export PS3LOAD = tcp : 192 . 168 . 1 . 100
# Or use hostname if you have DNS
export PS3LOAD = tcp : ps3 . local
# Add to ~/.bashrc or ~/.zshrc for persistence
echo 'export PS3LOAD=tcp:192.168.1.100' >> ~/.bashrc
Replace 192.168.1.100 with your PS3’s actual IP address.
Command-Line Usage
ps3load < filenam e > [application arguments]
Basic Examples
Load Application
Make Integration
Development Cycle
# Load and run SELF file
ps3load myapp.self
# With arguments
ps3load myapp.self --debug --verbose
Network Protocol
ps3load uses a simple TCP protocol on port 4299 .
Handshake
Send magic bytes HAXX (0x48415858)
Version
Send ps3load version (major.minor) and argument length
File Size
Send compressed and uncompressed file sizes
File Data
Stream file data (optionally compressed) in 4KB blocks
Arguments
Send null-terminated argument strings
Implementation Details
From tools/ps3load/source/main.c:156-175:
// Protocol header
b [ 0 ] = 'H' ;
b [ 1 ] = 'A' ;
b [ 2 ] = 'X' ;
b [ 3 ] = 'X' ;
tcp_write (s, b, 4 );
// Version and args length
b [ 0 ] = PS3LOAD_VERSION_MAYOR; // 0
b [ 1 ] = PS3LOAD_VERSION_MINOR; // 5
b [ 2 ] = (args_len >> 8 ) & 0x ff ;
b [ 3 ] = args_len & 0x ff ;
tcp_write (s, b, 4 );
// File sizes (compressed and uncompressed)
b [ 0 ] = (len >> 24 ) & 0x ff ;
b [ 1 ] = (len >> 16 ) & 0x ff ;
b [ 2 ] = (len >> 8 ) & 0x ff ;
b [ 3 ] = len & 0x ff ;
tcp_write (s, b, 4 );
Compression
ps3load automatically compresses files using zlib (level 6) to reduce transfer time.
// From tools/ps3load/source/main.c:332-362
if (compress) {
bufzlen = (uLongf) (( float ) fsize * 1.02 );
bufz = malloc (bufzlen);
printf ( "compressing %u bytes..." , (u32) fsize);
res = compress2 (bufz, & bufzlen, buf, fsize, 6 );
if (bufzlen < (u32) fsize) {
printf ( " %.2f%% \n " , 100.0 f * ( float ) bufzlen / ( float ) fsize);
len = bufzlen; // Compressed size
len_un = fsize; // Original size
free (buf);
buf = bufz;
} else {
printf ( " compressed size gained size, discarding \n " );
free (bufz);
}
}
PKG files (starting with PK\x03\x04) are not compressed as they’re already compressed.
Build System Integration
The PSL1GHT Makefile includes a run target:
# From samples/graphics/rsxtest/Makefile:123
run :
ps3load $( OUTPUT ) .self
# Usage:
# make run
Complete Makefile Example
include $( PSL1GHT ) /ppu_rules
TARGET := myapp
SOURCES := source
LIBS := -lrsx -lgcm_sys -lrt -llv2
.PHONY : run clean
# Build targets
$( TARGET ) .self: $( TARGET ) .elf
# Quick test
run : $( TARGET ) .self
ps3load $( TARGET ) .self
# Development cycle
test : clean all run
clean :
rm -rf $( BUILD ) $( TARGET ) .elf $( TARGET ) .self
Usage
# Build and run
make run
# Full rebuild and test
make test
# With arguments
ps3load myapp.self --level 5 --fullscreen
Troubleshooting
Error: resolving hostname
Can’t resolve the PS3 hostname/IP: # Verify PS3LOAD is set
echo $PS3LOAD
# Try direct IP
export PS3LOAD = tcp : 192 . 168 . 1 . 100
# Test network connectivity
ping 192.168.1.100
Error: connection refused
PS3 is not running a ps3load listener:
Launch a homebrew app that includes network loading
Check PS3 firewall settings
Verify port 4299 is not blocked
# Test if port is open
nc -zv 192.168.1.100 4299
Network issues or large file: # Check file size
ls -lh myapp.self
# Reduce file size by stripping
ppu-strip myapp.elf -o myapp.stripped.elf
fself myapp.stripped.elf myapp.self
# Check compression ratio
ps3load myapp.self # Shows compression %
Application doesn't start
The SELF file may be invalid:
Ensure you ran sprxlinker before fself
Check that SELF was created correctly
Try creating a PKG and installing instead
# Verify SELF format
file myapp.self
hexdump -C myapp.self | head -n 1
# Should start with: SCE\0\0\0\0\x02
Example Output
Successful ps3load session:
$ ps3load myapp.self
ps3load v0.5
coded by dhewg, #wiidev efnet
resolving ps3.local
connecting to 192.168.1.100:4299
sending upload request
sending file size (524288 bytes )
compressing 524288 bytes... 45.2%
sending data................
sending arguments (12 bytes )
done.
Advanced Usage
Loading with Multiple Arguments
# Pass multiple arguments to your app
ps3load game.self --player "John" --level 5 --debug
Arguments are passed to your application’s main():
int main ( int argc , char ** argv ) {
// argc = 4
// argv[0] = "game.self"
// argv[1] = "--player"
// argv[2] = "John"
// argv[3] = "--level"
// argv[4] = "5"
// argv[5] = "--debug"
}
Script Integration
#!/bin/bash
set -e
echo "Building..."
make clean
make
echo "Loading to PS3..."
ps3load myapp.self --test-mode
echo "Success!"
Multiple PS3 Systems
# Switch between multiple PS3s
export PS3LOAD = tcp : 192 . 168 . 1 . 100 # Dev PS3
ps3load test.self
export PS3LOAD = tcp : 192 . 168 . 1 . 101 # Test PS3
ps3load test.self
Strip Symbols Use ppu-strip to reduce file size before creating SELF
Wired Connection Use ethernet instead of WiFi for faster transfers
Asset Streaming Load large assets from USB/HDD instead of embedding in SELF
Build Directory Keep build artifacts to avoid rebuilding unchanged files
Source Code Reference
The ps3load implementation:
Main : tools/ps3load/source/main.c:1-417
Key Functions :
send_tcp(): main.c:94 - Network transfer implementation
tcp_write(): main.c:73 - Reliable TCP send
Protocol constants: main.c:48-51
Port and Version
#define PS3LOAD_VERSION_MAYOR 0
#define PS3LOAD_VERSION_MINOR 5
#define LD_TCP_PORT 4299
See Also
FSELF Tool Create SELF files for loading
Build System Integrate ps3load into build process
PKG Creation Create packages for distribution
Development Setup Configure your development environment