A flexible BootLoader for PlayStation 2™ and PSX-DESR
PS2BBL is a lightweight yet powerful bootloader for PlayStation 2™ and PSX-DESR systems.
It performs early system initialization and launches ELF executables from multiple storage backends, supporting both embedded and runtime-loaded drivers.
The boot process is deterministic, with a clearly defined configuration search order and strict separation between boot-time and runtime-enabled devices.
Full original documentation is available on GitHub Pages:
👉 https://israpps.github.io/PlayStation2-Basic-BootLoader/
This Repo is Forked from:
👉 https://github.com/pcm720/PlayStation2-Basic-BootLoader
This Repo's ReadMe.md has been modified from its original version to reflect this fork's documentation.
As a result, it is recommended to familiarize yourself with this PS2BBLE documentation before continuing, even if you are familiar with PS2BBL.
PS2BBL reads one primary configuration file per boot.
Some storage devices (HDD, MX4SIO, MMCE, XFROM) may not exist at boot time and can only be enabled after the initial configuration is parsed.
These devices cannot provide the CONFIG.INI used for the same boot pass.
Configuration sources therefore fall into two categories:
- Always-available sources (checked immediately)
- Conditionally-available sources (checked only after device initialization)
The search order below reflects this behavior explicitly.
(Activated sources only — first match wins)
CONFIG.INIin the current working directorymc1:/SYS-CONF/PS2BBL.INImc0:/SYS-CONF/PS2BBL.INImc?:/SYS-CONF/PSXBBL.INI(PSX builds only)
-
mmce1:/PS2BBL/PS2BBL.INI -
mmce0:/PS2BBL/PS2BBL.INI
(after MMCE driver initialization) -
xfrom:/PS2BBL/CONFIG.INI
(after XFROM is enabled) -
hdd0:__sysconf:pfs:/PS2BBL/CONFIG.INI
(after HDD stack initialization) -
massX:/PS2BBL/CONFIG.INI
(after MX4SIO initialization) -
mass:/PS2BBL/CONFIG.INI
If no configuration file is located, PS2BBL uses internal defaults.
AUTO
mc?:/BOOT/BOOT.ELFmc?:/BOOT/BOOT2.ELFmass:/RESCUE.ELF
SELECT
mass:/PS2BBL/L2[1].ELFmass:/PS2BBL/L2[2].ELFmass:/PS2BBL/L2[3].ELF
L3
mass:/PS2BBL/R2[1].ELFmass:/PS2BBL/R2[2].ELFmass:/PS2BBL/R2[3].ELF
R3
mc?:/OPL/OPNPS2LD.ELFmc?:/APPS/OPNPS2LD/ELFmass:/PS2BBL/OPNPS2LD.ELF
START
mass:/RESCUE.ELFmc?:/BOOT/BOOT2.ELFmc?:/APPS/ULE.ELF
These keys are parsed only from the primary CONFIG.INI.
They activate devices after configuration parsing has completed.
-
HDD_ENABLE=1
Enables the HDD stack after boot
(requiresHDD_RUNTIME=1build) -
MX4SIO_ENABLE=1
Loadsmx4sio_bd.irxand enablesmassX:
(requiresMX4SIOorMX4SIO_RUNTIME) -
MMCE_ENABLE=1
Loadsmmceman.irxand enablesmmce0:/mmce1:
(requiresMMCEorMMCE_RUNTIME) -
XFROM_ENABLE=1
Loadsxfromman.irxand enablesxfrom:
(requiresXFROMorXFROM_RUNTIME)
⚠️ These devices cannot supply the current boot’s CONFIG.INI.
To use configuration files from them, chain-load PS2BBL again or perform a second config pass.
LOAD_IRX_E#=<path>
Loads additional IRX modules during config parsing.
This does not add new configuration search paths.
LK_<BUTTON>_E#=<path>
Example:
LK_AUTO_E1=mc0:/BOOT/BOOT.ELF
LK_START_E1=mass:/RESCUE.ELF
SKIP_PS2LOGOKEY_READ_WAIT_TIMEEJECT_TRAYLOGO_DISPLAY
HDD=1MX4SIO=1MMCE=1XFROM=1
HDD_RUNTIME=1MX4SIO_RUNTIME=1MMCE_RUNTIME=1XFROM_RUNTIME=1
These require the matching *_ENABLE=1 INI key.
HAS_EMBED_IRX=1
Embeds USB / BDM IRXs directly into PS2BBL
Otherwise they are loaded externally from memory card
Runtime-loaded IRX modules are searched in this order:
mc0:/SYS-CONF/<IRX>mc1:/SYS-CONF/<IRX>mc?:/SYS-CONF/<IRX>
HDD_ENABLE=1
MX4SIO_ENABLE=1
MMCE_ENABLE=1
XFROM_ENABLE=1
LOAD_IRX_E1=mc0:/SYS-CONF/FSCK.IRX
LK_AUTO_E1=mc0:/BOOT/BOOT.ELF
LK_AUTO_E2=mc0:/BOOT/BOOT2.ELF
LK_AUTO_E3=mass:/RESCUE.ELF
KEY_READ_WAIT_TIME=5000
LOGO_DISPLAY=2
Required IRX files must exist under:
mc0:/SYS-CONF/ (or fallback memory-card paths).
; Keep the boot fast and deterministic
HDD_ENABLE=0
MX4SIO_ENABLE=0
MMCE_ENABLE=0
XFROM_ENABLE=0
; Simple key bindings
LK_AUTO_E1=mc0:/BOOT/BOOT.ELF
LK_START_E1=mc0:/APPS/ULE.ELF
; Skip branding to reduce boot time
SKIP_PS2LOGO=1
; Enable HDD after config parsing
HDD_ENABLE=1
; Expect additional drivers to be loaded from memory card
LOAD_IRX_E1=mc0:/SYS-CONF/ATAD.IRX
LOAD_IRX_E2=mc0:/SYS-CONF/DEV9.IRX
; Primary launcher lives on HDD
LK_AUTO_E1=hdd0:__sysconf:pfs:/PS2BBL/BOOT.ELF
; Fallback to memory card if HDD is missing
LK_AUTO_E2=mc0:/BOOT/BOOT.ELF
; Show logo but reduce wait
KEY_READ_WAIT_TIME=2000
LOGO_DISPLAY=1
MX4SIO_ENABLE=1
; Preferred launchers on MX4SIO
LK_AUTO_E1=massX:/PS2BBL/LOADER.ELF
LK_AUTO_E2=massX:/RESCUE.ELF
; Rescue path if MX4SIO is absent or fails
LK_AUTO_E3=mc0:/BOOT/BOOT2.ELF
; Keep tray closed and use a longer key-read window
EJECT_TRAY=0
KEY_READ_WAIT_TIME=8000
If you find one — please report it 🙂
- @SP193 — OSD initialization libraries
- asmblur — SDK support and encouragement
- @uyjulian, @fjtrujy — continuous assistance
- @israpps (El_isra) — original PS2BBL creator
- @pcm720 — reviews and contributions
- Requires a working ps2sdk toolchain in
PATH - Typical build:
make
(addHDD=1or*_RUNTIME=1flags as needed) mk_kelf.shgenerates KELF variants- External IRX must reside in
mc?:/SYS-CONF/when not embedded
- Run
scripts/cppcheck.shlocally or in Codacy. It invokescppcheckwith--library=std.cfg --check-config --enable=all --std=c99 --inline-suppr --suppress=missingIncludeSystemand includes:$PS2SDK/ee/include,$PS2SDK/iop/include,$PS2SDK/common/include(defaulting to/usr/local/ps2dev/ps2sdk)- Project headers under
include/ - Analysis-only PS2SDK shims under
tools/codacy_shims/ps2sdk/and minimal standard-library shims undertools/codacy_shims/stdlib/to avoid “missing include” findings when the real SDK or libc headers are unavailable