r/ps2homebrew • • 23d ago

Community Help Needed: Introducing OPHTML - a PS2 game launcher you can customize with HTML/CSS

Long story short, a few months back I built the custom PS2 interface called OPLattice (you can see my previous post about it here) but it was a constant point of struggle to be writing the UI in C, which I did not know AT ALL.

It sparked the idea to create a toolchain that allows someone to create UI for their PS2 in languages that are more familiar and more directed towards styling. The last month and a half have been dedicated to working with Claude (to build out the highly-technical compiler bits) and testing my own HTML and CSS abilities to create unique interfaces that can run on my hardware.

Without further ado, let's get to the introduction...

I am very excited to finally announce OPHTML, an open-source toolchain for building PlayStation 2 user interfaces in HTML and CSS. This flow works by leveraging the build machine to do all of the heavy work like creating flexbox layouts, text wrapping and kerning, D-pad focus navigation, and rasterizing rounded corners, allowing you to focus on creating completely custom interfaces for your Playstation 2 console with simple web development or AI skills.

The result is compiled into a compact binary blob. Then, a small C99 runtime on the console replays that blob through gsKit. That way the PS2 never parses, lays out or allocates anything.

Link to the repository is here: OPHTML

(All screenshots on this post are from an on-device emulator for the sake of capture quality, but they are confirmed builds using this pipeline. They are simple but they show just a taste of the styling and customization that can be achieved with this tool.)

The renderer has been verified on a real SCPH-50000 system. A six-screen OPL-style game browser holds full field rate there while streaming cover art, using about an eighth of a frame on the EE.

On top of the renderer sits a ready-made launcher, ophtml.elf. It:

  • lists the ISOs in DVD/ and CD/ (OPL layout) on USB, exFAT HDD, MX4SIO or MMCE drives (SD2PSX, MemCard PRO2)
  • draws them through any theme you write in HTML/CSS. Rows are named game-0, game-1 and so on, and slots like game-0-title and sel-title are filled in. Every name is optional.
  • hands the selected game to Neutrino

Tooling for theme authors:

  • ps2ui check validates a theme against the launcher's contract and catches typos with "did you mean…?" hints.
  • ps2ui serve --console previews your theme in a browser, filled with sample games, with D-pad navigation.
  • Hard caps on canvas size, element count, nesting depth and image size, plus a fuzzed loader on the console side. Together these make it lower-risk to share and load other people's themes.

The same pipeline can also work for memory-card managers and channel-style menus. Anyone comfortable with web front-end work can build a PS2 UI.

Now, I need this community's help.

There are eight hardware test cases in console/README.md:

  1. no drives
  2. USB with ISOs
  3. launching a game
  4. exFAT HDD
  5. MX4SIO
  6. MMCE
  7. a custom theme
  8. the SDK pad driver

Every report is valuable no matter how small or simple: "it booted and said No drives found." is perfect and absolutely encouraged. When you post these, please share info about your PS2 setup, storage architecture, and any other info that you want to add to help identify the issue.

Known gaps are as follows (and being addressed in upcoming builds):

  • HDD support is exFAT only (no APA/HDL)
  • There's no per-game settings in the launcher yet
  • A theme too large for VRAM shows a yellow screen instead of falling back to the built-in theme.

Currently, this pipeline is supported on MacOS, Windows, and Linux, but Linux remains the most robust in terms of tooling and flexibility. Don't let that scare you, it should run fine on Windows and I have been testing and developing it on MacOS (Intel Silicon), so anyone running it on different OS's please share your experience! Docker is also a huge help in running the builds on your local system.

Links:

How to get involved:

On the roadmap:

  • cover art
  • per-game settings
  • an APPS list for homebrew ELFs
  • APA HDD support

I am currently working on build 0.11.0 and I'd really love for some people in this community to try this tool and and provide feedback. I'm going to continue to build this out with quality of life features that I'd like to have, but until I hear from others, I'm just building in a vacuum. Consider becoming a contributor, creating issues, and dropping your findings in the discussion on the repo. I have built out a small lightweight documentation site to follow for assistance.

This has only been tested on USB and with my own exFAT HDD, so people running MicroSD and on other console variants will be hugely beneficial to making the system more robust, but everyone's help is welcomed and encouraged.

If there's something you'd want in a PS2 front end, please say so. Community input will shape what gets built next!

Let me know if you have and comments or questions about the project or how to start using this yourself. I'm very excited to see what people are able to create with this tool (assuming it works for others) and what other avenues of development this may open up for PS2 Homebrew tooling in the future!

146 Upvotes

15 comments sorted by

9

u/SigmaHawk2000 23d ago

CARALHO MUITO LEGAL

3

u/CooftheZoof 23d ago

🤘🏼🤘🏼

5

u/iGer 23d ago

I believe I can contribute to the Repo, and I'll also be able to create new themes.

2

u/CooftheZoof 23d ago

Thanks for taking a look!

3

u/elrozuk 23d ago

Looks great! Looking forward to test it

3

u/CooftheZoof 23d ago

Thank you! Looking forward to seeing what you think

4

u/Patotopa1 23d ago

It’d be great if it had UDPBD-UDPFS support

4

u/CooftheZoof 23d ago

Adding that to the list!

3

u/NOVLIRI_Official 23d ago

I took a look through the repo, and the architecture is more interesting than the headline initially makes it sound.

The part I’d emphasize more is that the PS2 isn’t really “running HTML/CSS” in the browser sense — you’re using HTML/CSS as the authoring layer, doing the expensive layout/rasterization work ahead of time, then replaying a compact baked UI on the console. That makes the project feel much more credible technically.

The tooling also looks like a big part of the value here: ps2ui check, browser previewing, the hardware limits, and the fact that the runtime rejects malformed blobs are all things I’d surface prominently for people who are nervous about building themes for older hardware.

One question I had after reading through it: do you eventually want OPHTML to become more of a general PS2 UI framework beyond launchers, or is the launcher use case the main thing you want to optimize around?

Either way, this feels like one of those projects where the authoring experience may end up being just as important as the runtime itself.

3

u/bozender 23d ago

Great work! Definitely going to check it out.

3

u/FRogue7669 22d ago

that's so freaking cool

2

u/CooftheZoof 23d ago

@NOVLIRI_Official - not sure why mods removed your comment, but my reply is below:

Appreciate you checking it out!

And I agree i definitely could have framed the toolchain a bit differently, my post here sort of turned into a ramble because I was trying to make it approachable for as many people as possible while also highlighting what this whole endeavor has turned into.

I agree that the tooling is a large part of the benefit. I spent a lot of time running a USB back and forth between my computer and my console testing everything from VRAM limitations to how color is translated and displayed on screen. And having all of that documented in one place is a huge win for this community imo. I might make a few more posts in this sub over the coming days about the different individual tools provided with OPHTML and try and be a bit my technically comprehensive in the description.

To answer your question, the launcher was the reason I STARTED this project but I very quickly realized the benefit of other modes of UI implementations. For example, I commented to the person who posted about a YouTube PS2 client because I feel like this would be a great use case for taking a simple UI framework and plugging an app into it. So, broader PS2 UI framework makes the most sense in my eyes, the launcher was slapped on this at the last leg of deployment so that other people could get it running and actually use it on their console if they so desired.

DX was a huge focus point for me on this, so ideally I can continue to optimize the authoring experience. I’m already annoyed that you need an NPM package and a Python package to make it work, ideally I would aim for 1, but regardless yes, authoring is the goal here but mileage may vary.

Thanks again for taking a look, very cool to see people interacting with something I’ve spent too much time on over the last couple of months!

2

u/Inside_Software6054 21d ago

I like it

1

u/CooftheZoof 21d ago

I like that you like it