This is pretty incredibly - Fabrice Bellard builds stuff that just has such a wide spread impact - so cool that QuickJS enabled an old system like PS2 to have a bit of a homebrew revival through this AthenaEnv project
My photoshop skills are near zero, otherwise I'd have long gone and edited xkcd 2347 [1] to say next to the pillar "Something Fabrice Bellard probably implemented while half asleep just to prove he could do it".
There's a lot of FOSS projects that have something written by him in their dependency chain.
The author's short diversion about the hassle of using a random website for zip2iso functionality and asking about a cli tool for doing such conversion lead me to create this cross-platform python script with no external dependencies: https://github.com/scottvr/GENISO/blob/main/ZIP2ISO.py
Longer explanation in the comments of TFA, but short version is that it was mostly "vibe-coded" using Gemini3 Pro instead of having to read the ISO9660 spec, which was also impressive to me.
It would, but it would be platform-specific and an external dependency. It was my first thought too until I started planning out it working cross-platform.
FreeMcBoot on a memory card + USB flash drive (or internal disk) is a popular option to play on real hardware. Saves wear and tear on the optical drive too.
The interesting part here is about AthenaEnv. It looks like it uses QuickJS for the Javascript interpreter and wraps around the native system libraries that the PS2 provides.
I'm wondering if there's a modern similar project that would allow writing Javascript Canvas games (WebGPU / WebGL) and publishing on Switch/2, PS5, and Xbox.
From my understanding, they explicitly disallow JITs so you can't just wrap your JS game with Electron / Node Webkit and use V8. I'm not sure if anyone has tried publishing a game using a V8-jitless electron fork - the sdks for consoles are under NDA so there's not really much written about it publicly & most games using Unreal or Unity don't deal with these things themselves.
PC, Mac, and even mobile are surprisingly easier here because you can just run the JS via electron or in a webview on mobile.
Yeah, I saw the video about that earlier which is what led me to wonder if there was a native JS way now.
They used Kha in order to port only the console versions, the desktop versions remained JS from my understanding: https://github.com/Kode/Kha which is built on top of Haxe. This works, but it also means not having a single codebase anymore which would be one of the benefits of a JS based system.
There are other options here - something like using an AOT JS compiler like Porffor, but from my understanding it's never been tested (and would probably be missing a lot of support to get it working - like shimming canvas & providing a WebGPU context that the compiled JS could execute against).
The official Nintendo 3DS and Wii U SDKs both provided an Electron-like framework that allowed games to be written with web technologies. I seem to recall that it was discontinued at some point before the Switch? The Switch does have a WebKit browser applet that games can call to display web-based content, but it's pretty limited since JIT is disabled like you say. I've only ever seen it used for e-manuals.
Chrome apparently has a minimum memory requirement of 4GB, so you'd need to shrink it down to one-one-hundred-and-twenty-eighth its size to squeeze it into the PS2's 32MB of RAM.
Nice, this is similar to what I was wondering about - it looks like it's pretty limited in capability right now (looks like it only supports canvas2d at the moment: https://nxjs.n8.io/runtime/rendering/canvas), but in theory it would allow you to make a layer to convert WebGPU or WebGL games for Switch (ignoring the huge performance drop going from v8 / jit JS engines to QuickJS).
Cool article. AthenaEnv is an alternative follow-up to, also by same dev, Enceladus which uses Lua instead. Besides games they're used, and even more popular for this use case, homebrew apps. Examples being RETROLauncher & POPSLoader for Enceladus, and OSD-XMB for Athena.
There's a lot of FOSS projects that have something written by him in their dependency chain.
[1] https://xkcd.com/2347/
Longer explanation in the comments of TFA, but short version is that it was mostly "vibe-coded" using Gemini3 Pro instead of having to read the ISO9660 spec, which was also impressive to me.
Though I guess you could burn it to a disk anyway purely for the sake of authenticity.
I'm wondering if there's a modern similar project that would allow writing Javascript Canvas games (WebGPU / WebGL) and publishing on Switch/2, PS5, and Xbox.
From my understanding, they explicitly disallow JITs so you can't just wrap your JS game with Electron / Node Webkit and use V8. I'm not sure if anyone has tried publishing a game using a V8-jitless electron fork - the sdks for consoles are under NDA so there's not really much written about it publicly & most games using Unreal or Unity don't deal with these things themselves.
PC, Mac, and even mobile are surprisingly easier here because you can just run the JS via electron or in a webview on mobile.
Here is a detailed blog post about the topic : https://www.radicalfishgames.com/?p=6892
They used Kha in order to port only the console versions, the desktop versions remained JS from my understanding: https://github.com/Kode/Kha which is built on top of Haxe. This works, but it also means not having a single codebase anymore which would be one of the benefits of a JS based system.
There are other options here - something like using an AOT JS compiler like Porffor, but from my understanding it's never been tested (and would probably be missing a lot of support to get it working - like shimming canvas & providing a WebGPU context that the compiled JS could execute against).