Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6211eb0
feat: PSP overlay plugin PRX crate with in-game overlay and backgroun…
Feb 14, 2026
becabe6
fix: restore GU display list after OSK/dialog calls on PSP
Feb 14, 2026
59e9e34
fix: PRX plugin build errors (Rust 2024 edition compatibility)
Feb 14, 2026
ed26dc5
debug: add hook beacon and L+R+START fallback trigger
Feb 14, 2026
4739449
debug: add file-based diagnostic logging and multi-name hook discovery
Feb 14, 2026
9985bc8
fix: switch PRX plugin from restricted_std to no_std to prevent kerne…
Feb 14, 2026
c70720c
fix: remove sceMp3/sceAudio/scePower/sceRtc imports from PRX plugin
Feb 14, 2026
5b4397a
fix: use panic=unwind for PRX plugin to match rust-psp SDK expectations
Feb 14, 2026
71d77c0
debug: granular logging inside hook installation to find crash point
Feb 14, 2026
9eb49fd
debug: log sctrlHENFindFunction stub address before calling it
Feb 14, 2026
15db5c6
fix: flush dcache and use stack strings before sctrlHENFindFunction
Feb 14, 2026
d61ef18
debug: test sctrlHENFindFunction with known ThreadMan module first
Feb 14, 2026
e2ec448
debug: dump import stub machine code to diagnose call crash
Feb 14, 2026
d5cb7c9
fix: add 3s startup delay before calling sctrlHENFindFunction
Feb 14, 2026
13abc2b
fix: validate sctrl import stubs before calling CFW functions
Feb 14, 2026
bfeb94c
fix: recognize kernel-mode j-instruction stubs as resolved
Feb 14, 2026
8c08ad9
fix: bypass broken kernel stub delay slots with direct function calls
Feb 14, 2026
31ab19e
feat: inline hook fallback when PatchSyscall fails
Feb 14, 2026
9128679
debug: button-state indicator for overlay input diagnosis
Feb 14, 2026
133acd2
fix: use kernel-mode sceCtrl_driver for button polling in overlay
Feb 14, 2026
46e34b8
fix: init kernel controller sampling + volatile reads for button poll
Feb 14, 2026
c688cd9
fix: threaded controller polling and flicker-free overlay rendering
Feb 14, 2026
d41a72b
refactor: simplify plugin hook.rs using SDK's SyscallHook and find_fu…
Feb 14, 2026
0ba0444
chore: remove debug beacon dots from overlay
Feb 14, 2026
1fd3491
chore: update rust-psp dependency to main branch
Feb 15, 2026
5bdb85b
docs: update stale widget, command, and module counts
Feb 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Thumbs.db
*.SFO
*.PRX
psp_output_file.log
rust-std-src

# Secrets
*.key
Expand Down
14 changes: 9 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ cargo deny check
# PSP backend (excluded from workspace, requires nightly + cargo-psp)
cd crates/oasis-backend-psp && RUST_PSP_BUILD_STD=1 cargo +nightly psp --release

# PSP overlay plugin PRX (excluded from workspace, kernel mode)
cd crates/oasis-plugin-psp && RUST_PSP_BUILD_STD=1 cargo +nightly psp --release

# UE5 FFI shared library
cargo build --release -p oasis-ffi

Expand All @@ -65,17 +68,18 @@ oasis-types (foundation: Color, Button, InputEvent, backend traits, error ty
├── oasis-sdi (scene display interface: named object registry, z-order)
├── oasis-net (TCP networking, PSK auth, remote terminal, FTP)
├── oasis-audio (audio manager, playlist, MP3 ID3 parsing)
├── oasis-ui (15+ widgets: Button, Card, TabBar, ListView, flex layout)
├── oasis-ui (20+ widgets: Button, Card, TabBar, ListView, flex layout)
├── oasis-wm (window manager: drag/resize, hit testing, decorations)
├── oasis-skin (TOML skin engine, 8 skins, theme derivation)
├── oasis-terminal (80+ commands across 14 modules, shell features)
├── oasis-terminal (90+ commands across 17 modules, shell features)
├── oasis-browser (HTML/CSS/Gemini: DOM, CSS cascade, layout engine)
└── oasis-core (coordination: apps, dashboard, agent, plugin, script)
├── oasis-backend-sdl (SDL2 desktop/Pi rendering + input + audio)
│ └── oasis-app (binary entry points: oasis-app, oasis-screenshot)
├── oasis-backend-ue5 (software RGBA framebuffer for Unreal Engine 5)
│ └── oasis-ffi (cdylib C-ABI for UE5 integration)
└── oasis-backend-psp (excluded from workspace, PSP hardware via sceGu)
├── oasis-backend-psp (excluded from workspace, PSP hardware via sceGu)
└── oasis-plugin-psp (excluded from workspace, kernel-mode PRX overlay)
```

### Backend Trait Boundary
Expand All @@ -96,9 +100,9 @@ The framework is split into 16 workspace crates. Each module below is its own cr
- **oasis-sdi** -- Scene Display Interface: named objects with position, size, color, texture, text, z-order, gradients, rounded corners, shadows
- **oasis-skin** -- Data-driven TOML skin system with 8 skins (2 external in `skins/`, 7 built-in; xp exists in both forms). Theme derivation from 9 base colors to ~30 UI element colors.
- **oasis-browser** -- Embeddable HTML/CSS/Gemini rendering engine: DOM parser, CSS cascade, block/inline/table layout, link navigation, reader mode, bookmarks
- **oasis-ui** -- 15+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout
- **oasis-ui** -- 20+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout
- **oasis-vfs** -- Virtual file system: `MemoryVfs` (in-RAM), `RealVfs` (disk), `GameAssetVfs` (UE5 with overlay writes)
- **oasis-terminal** -- Command interpreter with 80+ commands across 14 modules (core, text, file, system, dev, fun, security, doc, audio, network, skin, UI, plus agent/plugin/script/transfer/update registered by oasis-core). Shell features: variable expansion, glob expansion, aliases, history, piping
- **oasis-terminal** -- Command interpreter with 90+ commands across 17 modules (core, text, file, system, dev, fun, security, doc, audio, network, skin, UI, plus agent/plugin/script/transfer/update registered by oasis-core). Shell features: variable expansion, glob expansion, aliases, history, piping
- **oasis-wm** -- Window manager (window configs, hit testing, drag/resize, minimize/maximize/close)
- **oasis-net** -- TCP networking with PSK authentication, remote terminal, FTP transfer
- **oasis-audio** -- Audio manager with playlist, shuffle/repeat modes, MP3 ID3 tag parsing
Expand Down
22 changes: 17 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ cargo deny check
# Build PSP backend (excluded from workspace, requires nightly + cargo-psp)
cd crates/oasis-backend-psp && RUST_PSP_BUILD_STD=1 cargo +nightly psp --release

# Build PSP overlay plugin PRX (excluded from workspace, kernel mode)
cd crates/oasis-plugin-psp && RUST_PSP_BUILD_STD=1 cargo +nightly psp --release

# Build UE5 FFI shared library
cargo build --release -p oasis-ffi

Expand All @@ -67,19 +70,28 @@ oasis-types (foundation: Color, Button, InputEvent, backend traits, error ty
├── oasis-sdi (scene display interface: named object registry, z-order)
├── oasis-net (TCP networking, PSK auth, remote terminal, FTP)
├── oasis-audio (audio manager, playlist, MP3 ID3 parsing)
├── oasis-ui (15+ widgets: Button, Card, TabBar, ListView, flex layout)
├── oasis-ui (20+ widgets: Button, Card, TabBar, ListView, flex layout)
├── oasis-wm (window manager: drag/resize, hit testing, decorations)
├── oasis-skin (TOML skin engine, 8 skins, theme derivation)
├── oasis-terminal (80+ commands across 14 modules, shell features)
├── oasis-terminal (90+ commands across 17 modules, shell features)
├── oasis-browser (HTML/CSS/Gemini: DOM, CSS cascade, layout engine)
└── oasis-core (coordination: apps, dashboard, agent, plugin, script)
├── oasis-backend-sdl (SDL2 desktop/Pi rendering + input + audio)
│ └── oasis-app (binary entry points: oasis-app, oasis-screenshot)
├── oasis-backend-ue5 (software RGBA framebuffer for Unreal Engine 5)
│ └── oasis-ffi (cdylib C-ABI for UE5 integration)
└── oasis-backend-psp (excluded from workspace, PSP hardware via sceGu)
├── oasis-backend-psp (excluded from workspace, PSP hardware via sceGu)
└── oasis-plugin-psp (excluded from workspace, kernel-mode PRX overlay)
```

### PSP Two-Binary Architecture

The PSP deployment uses two binaries:
- **`oasis-backend-psp`** (EBOOT.PBP) -- the full shell application, runs standalone
- **`oasis-plugin-psp`** (PRX) -- lightweight companion module loaded by CFW (ARK-4/PRO) via `PLUGINS.TXT`, stays resident in kernel memory alongside games

The PRX hooks `sceDisplaySetFrameBuf` to draw overlay UI into the game's framebuffer and claims a PSP audio channel for background MP3 playback. No dependency on oasis-core -- direct framebuffer rendering only (<64KB binary).

### Key Abstraction: Backend Traits

`oasis-core/src/backend.rs` defines the only abstraction boundary between core and platform:
Expand All @@ -98,9 +110,9 @@ The framework is split into 16 workspace crates. Each module below is its own cr
- **oasis-sdi** -- Scene Display Interface: named objects with position, size, color, texture, text, z-order, gradients, rounded corners, shadows
- **oasis-skin** -- Data-driven TOML skin system with 8 skins (2 external in `skins/`, 7 built-in; xp exists in both forms). Theme derivation from 9 base colors.
- **oasis-browser** -- Embeddable HTML/CSS/Gemini rendering engine: DOM parser, CSS cascade, block/inline/table layout, link navigation, reader mode
- **oasis-ui** -- 15+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout
- **oasis-ui** -- 20+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout
- **oasis-vfs** -- Virtual file system: `MemoryVfs` (in-RAM), `RealVfs` (disk), `GameAssetVfs` (UE5 with overlay writes)
- **oasis-terminal** -- Command interpreter with 80+ commands across 14 modules (core, text, file, system, dev, fun, security, doc, audio, network, skin, UI, plus agent/plugin/script/transfer/update registered by oasis-core). Shell features: variable expansion, glob expansion, aliases, history, piping
- **oasis-terminal** -- Command interpreter with 90+ commands across 17 modules (core, text, file, system, dev, fun, security, doc, audio, network, skin, UI, plus agent/plugin/script/transfer/update registered by oasis-core). Shell features: variable expansion, glob expansion, aliases, history, piping
- **oasis-wm** -- Window manager (window configs, hit testing, drag/resize, minimize/maximize/close)
- **oasis-net** -- TCP networking with PSK authentication, remote terminal, FTP transfer
- **oasis-audio** -- Audio manager with playlist, shuffle/repeat modes, MP3 ID3 tag parsing
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ Native virtual resolution is 480x272 (PSP native) across all backends.
- **Scene Graph (SDI)** -- Named object registry with position, size, color, texture, text, z-order, alpha, gradients, rounded corners, shadows
- **Browser Engine** -- Embedded HTML/CSS/Gemini renderer with DOM parsing, CSS cascade, block/inline/table layout, link navigation, reader mode, bookmarks
- **Window Manager** -- Movable, resizable, overlapping windows with titlebars, minimize/maximize/close, hit testing, and themed decorations
- **UI Widget Toolkit** -- 15+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout, and more
- **UI Widget Toolkit** -- 20+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout, and more
- **Proportional Bitmap Font** -- Variable-width glyph rendering from ink bounds with per-character advance values (not fixed-width 8x8)
- **80+ Terminal Commands** -- 14 command modules: core (fs/system), text processing (head, tail, grep, sort, uniq, tr, cut, diff), file utilities (write, tree, du, stat, xxd, checksum), dev tools (base64, json, uuid, seq, expr), fun (cal, fortune, banner, matrix), security (chmod, chown, passwd, audit), documentation (man, tutorial, motd), networking (wifi, ping, http), audio, UI, skin switching, scripting, transfer (FTP), system updates. Shell features include variable expansion, glob expansion, aliases, history (!!/!n), piping, and command chaining
- **90+ Terminal Commands** -- 17 command modules: core (fs/system), text processing (head, tail, grep, sort, uniq, tr, cut, diff), file utilities (write, tree, du, stat, xxd, checksum), dev tools (base64, json, uuid, seq, expr), fun (cal, fortune, banner, matrix), security (chmod, chown, passwd, audit), documentation (man, tutorial, motd), networking (wifi, ping, http), audio, UI, skin switching, scripting, transfer (FTP), system updates. Shell features include variable expansion, glob expansion, aliases, history (!!/!n), piping, and command chaining
- **Audio System** -- Playlist management, MP3/WAV playback, ID3 tag parsing, shuffle/repeat modes, volume control
- **Plugin System** -- Runtime-extensible via `Plugin` trait, VFS-based IPC, manifest-driven discovery
- **Virtual File System** -- `MemoryVfs` (in-RAM), `RealVfs` (disk), `GameAssetVfs` (UE5 with overlay writes)
Expand All @@ -80,7 +80,7 @@ Native virtual resolution is 480x272 (PSP native) across all backends.

## Crates

The framework is split into 16 workspace crates plus 1 excluded PSP backend:
The framework is split into 16 workspace crates plus 2 excluded PSP crates:

```
oasis-os/
Expand All @@ -92,15 +92,16 @@ oasis-os/
| +-- oasis-sdi/ # Scene Display Interface: named object registry, z-order, rendering
| +-- oasis-net/ # TCP networking, PSK authentication, remote terminal, FTP transfer
| +-- oasis-audio/ # Audio manager, playlist, shuffle/repeat, MP3 ID3 parsing
| +-- oasis-ui/ # 15+ widgets: Button, Card, TabBar, Panel, TextField, ListView, etc.
| +-- oasis-ui/ # 20+ widgets: Button, Card, TabBar, Panel, TextField, ListView, etc.
| +-- oasis-wm/ # Window manager: drag/resize, hit testing, minimize/maximize/close
| +-- oasis-skin/ # TOML skin engine, 8 skins, theme derivation from 9 base colors
| +-- oasis-terminal/ # Command interpreter: 80+ commands across 14 modules, shell features
| +-- oasis-terminal/ # Command interpreter: 90+ commands across 17 modules, shell features
| +-- oasis-browser/ # HTML/CSS/Gemini browser: DOM, CSS cascade, block/inline/table layout
| +-- oasis-core/ # Coordination layer: apps, dashboard, agent, plugin, script, etc.
| +-- oasis-backend-sdl/ # SDL2 rendering and input (desktop + Pi)
| +-- oasis-backend-ue5/ # UE5 software framebuffer + FFI input queue
| +-- oasis-backend-psp/ # [excluded from workspace] sceGu hardware rendering, PSP controller, UMD browsing
| +-- oasis-plugin-psp/ # [excluded from workspace] kernel-mode PRX: in-game overlay + background music
| +-- oasis-ffi/ # C FFI boundary for UE5 integration
| +-- oasis-app/ # Binary entry points: desktop app + screenshot tool
+-- skins/
Expand All @@ -120,19 +121,20 @@ oasis-os/
| `oasis-sdi` | Scene Display Interface: named object registry with position, size, color, texture, text, z-order, gradients, shadows |
| `oasis-net` | TCP networking with PSK authentication, remote terminal, FTP transfer |
| `oasis-audio` | Audio manager with playlist, shuffle/repeat modes, MP3 ID3 tag parsing |
| `oasis-ui` | 15+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout |
| `oasis-ui` | 20+ reusable widgets: Button, Card, TabBar, Panel, TextField, ListView, ScrollView, ProgressBar, Toggle, NinePatch, flex layout |
| `oasis-wm` | Window manager: movable/resizable windows, titlebar buttons, hit testing, themed decorations |
| `oasis-skin` | Data-driven TOML skin system with 8 skins, theme derivation from 9 base colors to ~30 UI element colors |
| `oasis-terminal` | Command interpreter with 80+ commands across 14 modules, shell features (variables, globs, aliases, history, piping) |
| `oasis-terminal` | Command interpreter with 90+ commands across 17 modules, shell features (variables, globs, aliases, history, piping) |
| `oasis-browser` | Embeddable HTML/CSS/Gemini rendering engine: DOM parser, CSS cascade, block/inline/table layout, reader mode |
| `oasis-core` | Coordination layer: app runner (dual-panel file manager), dashboard, agent/MCP, plugin, scripting, status/bottom bars |
| `oasis-backend-sdl` | SDL2 rendering and input backend for desktop and Raspberry Pi |
| `oasis-backend-ue5` | UE5 render target backend -- software RGBA framebuffer and FFI input queue |
| `oasis-backend-psp` | PSP hardware backend -- sceGu sprite rendering, PSP controller input, dual-panel file manager, UMD disc browsing, std via [rust-psp](https://github.com/AndrewAltimit/rust-psp) SDK |
| `oasis-plugin-psp` | PSP overlay plugin PRX -- kernel-mode companion module for in-game overlay UI and background MP3 playback |
| `oasis-ffi` | C-ABI FFI boundary (`cdylib`) for UE5 and external integrations |
| `oasis-app` | Desktop entry point (SDL2) and screenshot capture tool |

The PSP backend is excluded from the workspace (requires `mipsel-sony-psp` target) and depends on the standalone [rust-psp SDK](https://github.com/AndrewAltimit/rust-psp) via git dependency.
The PSP crates are excluded from the workspace (require `mipsel-sony-psp` target) and depend on the standalone [rust-psp SDK](https://github.com/AndrewAltimit/rust-psp) via git dependency. The backend compiles to an EBOOT.PBP (standalone application), while the plugin compiles to a kernel-mode PRX (resident overlay module loaded by CFW via `PLUGINS.TXT`).

## Building

Expand All @@ -156,6 +158,16 @@ RUST_PSP_BUILD_STD=1 cargo +nightly psp --release
# Output: target/mipsel-sony-psp-std/release/EBOOT.PBP
```

### PSP Overlay Plugin (PRX)

```bash
cd crates/oasis-plugin-psp
RUST_PSP_BUILD_STD=1 cargo +nightly psp --release
# Output: target/mipsel-sony-psp-std/release/oasis-plugin-psp.prx
```

See [PSP Plugin Guide](docs/psp-plugin.md) for installation and usage.

### UE5 (FFI Library)

```bash
Expand Down Expand Up @@ -229,6 +241,7 @@ GitHub Actions workflows run the full pipeline automatically on push to `main` a
- [Technical Design Document](docs/design.md) -- architecture, backends, skins, UE5 integration, PSP implementation, VFS, plugin system, security considerations, migration strategy (v2.4, 1300+ lines)
- [Skin Authoring Guide](docs/skin-authoring.md) -- creating custom skins, TOML file reference, theme derivation, effect system, runtime switching
- [PSP Modernization Plan](docs/psp-modernization-plan.md) -- 9-phase, 40-step roadmap for PSP backend modernization using the rust-psp SDK
- [PSP Plugin Guide](docs/psp-plugin.md) -- installation, controls, and configuration for the in-game overlay PRX

## License

Expand Down
2 changes: 1 addition & 1 deletion crates/oasis-backend-psp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/oasis-backend-psp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ kernel-me-clock = ["psp/kernel"] # scePowerGetMeClockFrequency
kernel-me = ["psp/kernel"] # ME coprocessor (me test command)

[dependencies]
psp = { git = "https://github.com/AndrewAltimit/rust-psp", branch = "main", features = ["std"] }
psp = { git = "https://github.com/AndrewAltimit/rust-psp", features = ["std"] }
oasis-core = { path = "../oasis-core" }
libm = "0.2"

Expand Down
Loading
Loading