1 Introductional Rant
1.1 Things that are in this document
1.2 Things that are not in this document
1.3 Conventions
2 System Overview
2.1 Playstation Portable Main Unit
2.1.1 Modells/Revisions
2.2 Game Specifications
2.3 Supplied accessories
2.4 Separately Sold Accessories
2.4.1 Memory Stick Duo (PSP-M32)
2.4.2 AC adaptor (PSP-100)
2.4.3 Battery pack (PSP-110)
2.4.4 Headphone with remote control (PSP-140(W))
2.4.5 Soft case and hand strap (PSP-170(B))
2.4.6 USB microphone (PSP-240(X))
2.4.7 GPS receiver
2.4.8 Camera
2.5 Development Hardware (DEM-100)
3 Hardware Overview
3.1 Mainboard
3.1.1 Revisions
3.1.2 Semiconductors
3.1.3 other
3.2 WIFI Daughterboard
3.2.1 Semiconductors
3.3 Headphones/Remote Control
3.4 Memory Stick
3.5 Talkman Microphone
4 CPU Overview
4.1 Registers
4.2 Debug Registers
4.3 COP0 (System Control)
4.3.1 Status Registers (mfc/mtc)
4.3.2 Control Registers (cfc/ctc)
4.4 COP1 (FPU)
4.4.1 Status Registers (mfc/mtc)
4.4.2 Control Registers (cfc/ctc)
4.5 COP2 (VFPU)
4.5.1 Registers
4.5.2 Extra Registers
4.6 Instruction Format
4.7 MIPS Instructions
4.7.1 lw
4.7.2 sw
4.7.3 addiu
4.8 Allegrex Instructions
4.8.1 halt
4.8.2 mfic / mtic
4.9 VFPU Instructions
4.9.1 lv
4.9.2 sv
4.9.3 vzero
4.9.4 vone
4.9.5 vmzero
4.9.6 vmidt
4.9.7 vmmul
4.9.8 vrcp
4.9.9 vexp2
4.9.10 vlog2
4.9.11 vsqrt
4.9.12 vrsq
4.9.13 vsin
4.9.14 vcos
4.9.15 vasin
4.9.16 vnrcp
4.9.17 vnsin
4.9.18 vrexp2
4.9.19 vi2uc
4.9.20 vi2s
4.9.21 vcst
4.9.22 vf2in
4.9.23 vi2f
4.9.24 vadd
4.9.25 vsub
4.9.26 vdiv
4.9.27 vmul
4.9.28 vdot
4.9.29 vhdp
4.9.30 vidt
4.9.31 vabs
4.9.32 vneg
4.9.33 vsgn
4.9.34 vmin
4.9.35 vmax
4.9.36 vtfm
4.9.37 vhtfm
4.10 Caches
4.10.1 Cache structure and operation
4.10.2 Cache Coherency
4.10.3 The Uncached Address Space
4.10.4 Cache Management Functions
5 Media Engine
5.1 Overview
5.2 Memory Map
5.2.1 physical Memory
5.2.2 Ram Usage
5.3 COP0
5.3.1 Status registers (mfc/mtc)
5.3.2 Control Registers (cfc/ctc)
5.4 COP1 (FPU)
5.4.1 Status Registers (mfc/mtc)
5.4.2 Control Registers (cfc/ctc)
6 VME
6.1 Overview
7 Memory Map
7.1 Segments
7.2 physical Memory
7.3 Ram usage
7.3.1 Kernel
7.3.2 Userspace
7.4 Hardware
8 Hardware Registers
8.1 ? (threadman)
8.2 System Config
8.3 ? (interruptman)
8.4 Profiler
8.5 ME Control
8.6 NAND Flash
8.6.1 Command Set
8.6.2 Read ID
8.6.3 read from NAND
8.6.4 write to NAND
8.7 KIRK - Decryption Engine
8.7.1 Keys
8.8 GPIO
8.9 UART4
8.10 UART3 Headphone/Remote SIO
9 Exception Processing
9.1 Exception Cause
9.2 Reset Vector (HW,SW,NMI)
9.2.1 ME Reset Handler
9.3 EBASE Vector (IRQ,Syscall)
9.4 Error Handler
9.5 Exception Handler
9.5.1 error
9.5.2 interrupt
9.5.3 syscall
9.6 Debug Exception Vectors
9.6.1 Debug Handler
10 Video Processing
10.1 Overview
10.2 VRAM Mirrors
10.2.1 VRAM
10.2.2 VRAM +2Mib
10.2.3 VRAM +4Mib
10.2.4 VRAM +6Mib
11 3D Graphics Processing
11.1 GE Command Format
11.2 GE Floats
11.3 Pointers
11.4 Enabling Registers
11.5 GE Command List
11.5.1 VADDR
11.5.2 IADDR
11.5.3 PRIM
11.5.4 BEZIER
11.5.5 SPLINE
11.5.6 BBOX
11.5.7 JUMP
11.5.8 BJUMP
11.5.9 CALL
11.5.10 RET
11.5.11 END
11.5.12 SIGNAL
11.5.13 FINISH
11.5.14 BASE
11.5.15 VTYPE
11.5.16 REGION1
11.5.17 REGION2
11.5.18 BOFS
11.5.19 BONE
11.5.20 MW0
11.5.21 MW1
11.5.22 MW2
11.5.23 MW3
11.5.24 MW4
11.5.25 MW5
11.5.26 MW6
11.5.27 MW7
11.5.28 PSUB
11.5.29 PPRIM
11.5.30 PFACE
11.5.31 WORLD
11.5.32 VIEW
11.5.33 PROJ
11.5.34 TMA
11.5.35 XSCALE
11.5.36 YSCALE
11.5.37 ZSCALE
11.5.38 XPOS
11.5.39 YPOS
11.5.40 ZPOS
11.5.41 USCALE
11.5.42 VSCALE
11.5.43 UOFFSET
11.5.44 VOFFSET
11.5.45 OFFSETX
11.5.46 OFFSETY
11.5.47 SHADE
11.5.48 CMAT
11.5.49 EMC
11.5.50 AMC
11.5.51 DMC
11.5.52 SMC
11.5.53 AMA
11.5.54 SPOW
11.5.55 ALC
11.5.56 ALA
11.5.57 LMODE
11.5.58 LT0
11.5.59 LT1
11.5.60 LT2
11.5.61 LT3
11.5.62 LXP0
11.5.63 LYP0
11.5.64 LZP0
11.5.65 LXP1
11.5.66 LYP1
11.5.67 LZP1
11.5.68 LXP2
11.5.69 LYP2
11.5.70 LZP2
11.5.71 LXP3
11.5.72 LYP3
11.5.73 LZP3
11.5.74 LXD0
11.5.75 LYD0
11.5.76 LZD0
11.5.77 LXD1
11.5.78 LYD1
11.5.79 LZD1
11.5.80 LXD2
11.5.81 LYD2
11.5.82 LZD2
11.5.83 LXD3
11.5.84 LYD3
11.5.85 LZD3
11.5.86 LCA0
11.5.87 LLA0
11.5.88 LQA0
11.5.89 LCA1
11.5.90 LLA1
11.5.91 LQA1
11.5.92 LCA2
11.5.93 LLA2
11.5.94 LQA2
11.5.95 LCA3
11.5.96 LLA3
11.5.97 LQA3
11.5.98 ???
11.5.99 ???
11.5.100 ???
11.5.101 ???
11.5.102 ???
11.5.103 ???
11.5.104 ???
11.5.105 ???
11.5.106 ALC0
11.5.107 DLC0
11.5.108 SLC0
11.5.109 ALC1
11.5.110 DLC1
11.5.111 SLC1
11.5.112 ALC2
11.5.113 DLC2
11.5.114 SLC2
11.5.115 ALC3
11.5.116 DLC3
11.5.117 SLC3
11.5.118 FFACE
11.5.119 FBP
11.5.120 FBW
11.5.121 ZBP
11.5.122 ZBW
11.5.123 TBP0
11.5.124 TBP1
11.5.125 TBP2
11.5.126 TBP3
11.5.127 TBP4
11.5.128 TBP5
11.5.129 TBP6
11.5.130 TBP7
11.5.131 TBW0
11.5.132 TBW1
11.5.133 TBW2
11.5.134 TBW3
11.5.135 TBW4
11.5.136 TBW5
11.5.137 TBW6
11.5.138 TBW7
11.5.139 CBP
11.5.140 CBPH
11.5.141 TRXSBP
11.5.142 TRXSBW
11.5.143 TRXDBP
11.5.144 TRXDBW
11.5.145 TSIZE0
11.5.146 TSIZE1
11.5.147 TSIZE2
11.5.148 TSIZE3
11.5.149 TSIZE4
11.5.150 TSIZE5
11.5.151 TSIZE6
11.5.152 TSIZE7
11.5.153 TMAP
11.5.154 ???
11.5.155 TMODE
11.5.156 TPSM
11.5.157 CLOAD
11.5.158 CMODE
11.5.159 TFLT
11.5.160 TWRAP
11.5.161 TBIAS
11.5.162 TFUNC
11.5.163 TEC
11.5.164 TFLUSH
11.5.165 TSYNC
11.5.166 FDIST
11.5.167 FCOL
11.5.168 TSLOPE
11.5.169 PSM
11.5.170 CLEAR
11.5.171 SCISSOR1
11.5.172 SCISSOR2
11.5.173 NEARZ
11.5.174 FARZ
11.5.175 CTST
11.5.176 CREF
11.5.177 CMSK
11.5.178 ATST
11.5.179 STST
11.5.180 SOP
11.5.181 ZTST
11.5.182 ALPHA
11.5.183 SFIX
11.5.184 DFIX
11.5.185 DTH0
11.5.186 DTH1
11.5.187 DTH2
11.5.188 DTH3
11.5.189 LOP
11.5.190 ZMSK
11.5.191 PMSKC
11.5.192 PMSKA
11.5.193 TRXKICK
11.5.194 TRXSPOS
11.5.195 TRXDPOS
11.5.196 TRXSIZE
11.6 Texture Cache
11.7 Memory Bandwidth
12 Audio Processing
12.1 Overview
13 Infrared Port
14 WLAN
15 USB Port
16 UMD
17 Memory Stick
18 Headphone/Remote Control
18.1 Audio Input
18.2 Serial Communications
19 Flash Memory
19.1 Physical Layout
19.2 User Area (Main Data)
19.2.1 Physical Layout (unmapped)
19.2.2 Logical Layout (mapped)
19.2.3 Bootstrap (IPL Area)
19.2.4 ID Storage Area
19.2.5 FAT Area
19.3 Spare Area (extra Data)
19.4 Tools
20 Flash Memory Structure (flash0)
20.1 DATA Subdirectory
20.1.1 CERT Subdirectory
20.2 DIC Subdirectory
20.3 FONT Subdirectory
20.4 KD Subdirectory
20.4.1 Kernel Modules
20.4.2 Boot Configurations
20.5 VSH Subdirectory
20.5.1 ETC Subdirectory
20.5.2 MODULE Subdirectory
20.5.3 RESOURCE Subdirectory
21 Flash Memory Structure (flash1)
21.1 DIC Subdirectory
21.2 REGISTRY Subdirectory
21.3 VSH Subdirectory
21.3.1 THEME Subdirectory
22 Memory Stick Structure
22.1 Root Directory
22.1.1 PSP Subdirectory
22.1.2 MP_Root Subdirectory
22.1.3 HIFI Subdirectory
22.1.4 CONTROL Subdirectory
22.1.5 DCIM Subdirectory
22.1.6 MISC Subdirectory
23 UMD Game Structure
23.1 Root Directory
23.1.1 PSP_GAME Subdirectory
24 UMD Video Structure
24.1 Root Directory
24.1.1 UMD_VIDEO Subdirectory
25 UMD Audio Structure
25.1 Root Directory
25.1.1 UMD_VIDEO Subdirectory
26 File Formats
26.1 ELF (Executable & Linkable Fileformat)
26.1.1 Tools
26.2 PRX (PSP Relocateble eXecutable)
26.2.1 Program Headers
26.2.2 special Sections
26.2.3 Custom Relocation Format
26.2.4 Unique ELF type
26.2.5 Tools
26.3 PBP
26.3.1 Tools
26.4 PSF (SFO)
26.4.1 Tools
26.5 PSP
26.5.1 Tools
26.6 PSAR
26.6.1 Structure
26.6.2 Header
26.6.3 Section Header
26.6.4 Type A Section (Data Block)
26.6.5 Type B Section (compressed Data Block)
26.6.6 Tools
26.7 Gamesave
26.7.1 Tools
26.8 PMF (PSMF)
26.9 PGF
26.9.1 Tools
26.10 THM
26.11 MP4
26.12 AT3
26.13 PNG
26.14 RCO
26.15 IREG
26.15.1 Header
26.15.2 Entries
26.16 DREG
26.16.1 Entry
26.16.2 Tools
26.17 CER
26.18 DIC
26.19 flash
26.20 ISO
26.21 DAX
26.22 CSO
26.23 ezip
27 Graphic Formats
27.1 1555 ABGR
27.2 4444 ABGR
27.3 565 BGR
27.4 8888 ABGR
27.5 swizzling
27.6 S3TC Compression
27.6.1 DXT1
27.6.2 DXT3
27.6.3 DXT5
28 Boot Process
28.1 Cold Boot
28.1.1 embedded Bootstrap
28.1.2 IPL Stage 1
28.1.3 IPL Stage 2
28.2 Load Exec
28.2.1 Stage 1
28.2.2 Stage 2
28.3 Exit Game
28.4 reboot.prx
29 Kernel
29.1 Devices
29.1.1 Block Devices
29.1.2 Filesystems
29.2 Return Codes
29.2.1 Structure
29.2.2 Facilities
29.2.3 General Errors
29.2.4 Errnos
29.2.5 Kernel Errors
29.2.6 Network Errors
29.2.7 unspecified Errors
29.3 Versions
29.3.1 1.0
29.3.2 1.5
29.3.3 1.51
29.3.4 1.52
29.3.5 2.0
29.3.6 2.01
29.3.7 2.5
29.3.8 2.6
29.3.9 2.7
29.3.10 2.71
29.3.11 2.8
29.3.12 2.81
29.3.13 2.82
29.3.14 3.0
29.3.15 3.01
29.3.16 3.02
29.3.17 3.03
29.4 Exploits
29.4.1 Kxploit (Code Execution)
29.4.2 TIFF Exploit (Code Execution)
29.4.3 GTA Savegame Exploit (Code Execution)
29.4.4 LoadExec Exploit (gain Kernel access)
29.5 Network Update
29.6 Network Test
29.7 Registry
29.8 VSH
29.9 Game Sharing
30 Modchips
30.1 Undiluted Platinum (UP)
30.2 0okm's Multi Firmware Module (MFM)
30.3 Homemade Flash Interfaces
30.3.1 Nem
30.3.2 0okm
30.3.3 Booster
30.3.4 ryoko no usagi
31 Appendix
31.1 GCC Quick How To
31.1.1 compile ASM to object:
31.1.2 compile C to object:
31.1.3 compile C++ to object:
31.1.4 link objects
31.1.5 remove unneeded sections (debug info etc) from object
31.1.6 convert object to plain binary
31.1.7 convert absolute address into filename/line number/function
31.1.8 Building a Crosscompiler
31.1.9 Linker Script
31.1.10 Startup Code
31.2 Games
31.3 Developers
32 References
32.1 Sources
33 Credits