Skip to content
 
 

Repository files navigation

Moonlight PSP

v1.4.0 - PSP-native H.264 Game Streaming Client

Build PSP FW License Status Release


Moonlight PSP is a Moonlight-compatible game-streaming client for Sony PSP systems, designed around a custom PSP-native networking, decode, audio, input, and rendering stack.

The project streams H.264 video from a host PC running Sunshine, decodes video on the PSP main CPU, and uses the Media Engine for accelerated YUV-to-RGBA conversion.

New in v1.4

  • Full H.264 CABAC Stream Support: Delivers optimized, hardware-accelerated software decoding for CABAC H.264 streams on the PSP. Perfect for hosts using AMD AMF encoders which default to CABAC.
  • 3-Slot Decoder Buffer Ring: Prevents frame pointer contention and stalls between the OpenH264/Media Engine threads and the presenter.
  • Tighter Teardown & Safe Process Exit: Gracefully cleans up lingering thread contexts, exit callback structures, and Wi-Fi networks before PRX self-unloads, preventing physical black screen hangs.
  • Integrated DNS Resolution: Uses PSP net resolver to resolve DDNS/hostnames via gethostbyname() with IP fallback, fixing remote/external connectivity (Issue #8).

Highlights

Feature Status Notes
Host discovery Implemented mDNS, known-host probes, optional subnet scan
Pairing + TLS transport auth Implemented Runtime identity, PIN flow, authenticated confirm
Game library + icons Implemented Sunshine box-art download, static PNG decode, raw RGB565 cache
RTSP / RTP / FEC pipeline Implemented PSP-native transport with CAVLC host profile required
OpenH264 decode + ME conversion Implemented PSP-optimized software decode path
Audio Implemented Opus playback when enabled; Performance preset disables local audio work
Input Implemented Xbox and Browser modes, customizable PSP combo mapper
UPnP hotspot/remote assist Implemented Temporary IGD UDP port mapping for stream ports
Multi-host support Implemented Up to 8 paired hosts

Recommended Host Profile

  • Codec: H.264
  • Encoder profile: Baseline
  • Entropy: CAVLC
  • Rate control: low latency / bandwidth-limited mode
  • FEC: start at 35 percent for PSP Wi-Fi, then tune only if your network is clean

This guidance applies to NVIDIA NVENC, AMD AMF, Intel QSV, and software x264 hosts. See the encoder guides in docs/ for backend-specific keys.

Preset Guide

Preset Use When Stream Audio
Performance You want the most responsive PSP-1000 profile 300x170, 30 fps, 384 kbps, 1056-byte packets Disabled
Balanced You want a middle point between detail and smoothness 360x204, 20 fps, 480 kbps, 1200-byte packets Enabled
Quality You want native PSP resolution 480x272, 10 fps, 576 kbps, 1200-byte packets Enabled

Audio Disabled is a client-side low-work mode. It skips local Opus decode, SRC playback, and audio output work on the PSP. It does not require changing Sunshine host settings and can be changed from the PSP settings menu.

How It Works

Main CPU (Allegrex)                    Media Engine
--------------------                   ---------------------------
Wi-Fi receive + RTP/FEC processing     YUV420P -> RGBA8888 via VFPU
OpenH264 software decode               Concurrent conversion work
Control/input channel                  Output frame handoff
Opus audio decode when enabled

Requirements

PSP

  • PSP-1000 / PSP-2000 / PSP-3000
  • Custom firmware: ARK-4 on 6.60/6.61 is the supported target
  • 2.4 GHz Wi-Fi

Host PC

  • Sunshine current stable release recommended
  • H.264 Baseline + CAVLC configured for PSP-compatible streaming

Building

See docs/BUILDING.md for full environment setup.

# 1) Build Media Engine helper PRX
cd moonlight_me_helper && make

# 2) Build application. Retail mode is the default.
cd .. && make

# Optional verbose diagnostics build
make RETAIL_BUILD=0

Build output includes:

  • EBOOT.PBP
  • moonlight_me_helper.prx

Install

Quick install path:

  1. Create this folder on the Memory Stick:
ms0:/PSP/GAME/Moonlight/
  1. Copy both files into that folder:
  • EBOOT.PBP
  • moonlight_me_helper.prx
  1. Launch from XMB -> Game -> Memory Stick.

Runtime data is written to ms0:/PSP/SAVEDATA/Moonlight/, not the install folder.

When updating from an older build, delete stale old-build files/folders such as ms0:/moonlight/ and the old ms0:/PSP/GAME/Moonlight/ install folder before copying v1.4, then pair again in Sunshine.

For full setup, pairing flow, and troubleshooting, see INSTALL.md.

Known Limitations

  • The PSP Wi-Fi radio is 2.4 GHz only and remains the main practical bottleneck.
  • H.264 CAVLC is recommended for lower decode latency, but CABAC is fully supported and optimized in v1.4.0.
  • High resolutions above the native PSP display are outside the intended operating range.
  • Some fast-motion content can still expose the PSP display and network limits.

Detailed notes: docs/KNOWN_ISSUES.md

Documentation Index

Version History

  • v1.4.0: H.264 CABAC stream decoding support, 3-slot decoder ring buffer, safe self-module exit teardown, and Net Resolver DNS hostname support.
  • v1.3.0: Savedata runtime layout, remote public-IP launch fix, pairing persistence, XMB artwork, and safer HOME/XMB exit cleanup.
  • v1.2.0: PSP preset ladder, packet-size setting, pairing confirm, controller-map overhaul, Browser input cleanup, and transition-buffer fixes.
  • v1.1.0: Network controller refinements and retail artifact publication.
  • v1.0.0: Public release of the PSP-native rewrite.
  • v0.2.x: Public beta cycle.

Contributing

See CONTRIBUTING.md.

License

GPLv3 - see LICENSE.

About

Moonlight Game Streaming Client for Sony PlayStation Portable

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages