OPHTML¶
OPHTML builds PlayStation 2 homebrew user interfaces from HTML and CSS. A build machine measures the layout, rasterizes the text and images, and packs the result into one blob. A small C99 runtime on the console only replays that blob, so the console never parses a document, runs flexbox, or lays out a frame. Focus, navigation, theming and dynamic text are all decided before the blob ships. The console only moves a cursor and swaps a table.
Two tools sit between the two files the pipeline names. ps2ui-layout
turns HTML and CSS into ui.json, and ps2ui-bake turns ui.json into
.uib. How it works
covers both seams and the rules the design rests on.
One blob renders in more than one theme, swapped on the console at runtime with no rebuild and no second asset set. These two pictures are the same opl-env library screen, the same blob, theme 0 then theme 1:


Start here¶
- Installation installs both packages and checks each is on PATH. Do this first.
- Quick start runs eight commands from a TTF to a served preview, on a project scaled down to fit one page.
- Tutorial: a game browser builds the same screen from an empty directory, then drives it from a checked C loop, closer to a real project.
Requirements¶
| need | version | used by |
|---|---|---|
| Node.js | 18 or newer | ps2ui-layout, ps2ui-dev |
| Python | 3.9 or newer | ps2ui, ps2ui-bake, ps2ui-check, ps2ui-fontgen |
| Pillow | 9 or newer | ps2ui-bake, ps2ui-fontgen |
| uharfbuzz | 0.51.7 or newer | ps2ui-fontgen; pip installs it, and nothing comes from the system |
| a TTF | any | ps2ui-fontgen |
| a C cross toolchain (ps2dev) | latest | the console half only, vendored by ps2ui vendor-runtime |
Sections¶
- Getting started: Installation, Quick start, Tutorial: a game browser, How it works.
- Authoring: The project file, HTML, CSS, Text and fonts, Images, Dynamic text, Lists, Focus and navigation, Theming, Screens and overlays, Video modes, CRT linter, VRAM budget.
- CLI: ps2ui, ps2ui-layout and ps2ui-dev, ps2ui-bake, ps2ui-check, ps2ui-fontgen, Previewer.
- Runtime: Integrating the runtime, The frame loop, C API reference, Errors and constants, Streaming art, Moving and hiding, Telemetry, Deploying, First boot.
- Reference: ui.json, .uib, Diagnostics, Compatibility.
- Examples: memcard, opl-env, channel6.
- Project: Changelog, Contributing, Security and license, FAQ, Glossary, Internals.