How danielsant0s/athenaenv works
AthenaEnv is a JavaScript runtime for PlayStation 2: developers run JavaScript through a modified QuickJS interpreter and use built-in APIs to create graphics, games, and system/network applications. A representative user-to-result path is script execution, drawing through Screen/Font/Render APIs, then presenting the frame. The README also documents input, audio, video, file/archive, IOP, and network capabilities. Several subsystem links are documented capabilities rather than inspected call sites; the graph does not infer internal calls between them.
Main entry points: ath_env.c Built-in JS APIs · quickjs.h QuickJS engine · ath_http.c HTTP and TLS · native_compiler.c Native compiler
Components 22
Runtime and APIs
- QuickJS engine
src/quickjs/quickjs.h - Built-in JS APIs
src/js_api/ath_env.c - Native compiler
src/native_compiler/native_compiler.c
Graphics and media
- 3D rendering
src/js_api/ath_render.c - Screen control
src/js_api/ath_screen.c - 2D drawing
src/graphics.c - Images and textures
src/image_loaders.c - Tile maps
src/include/tile_render.h - Font rendering
src/fntsys.c - Shadow projection
src/include/shadows.h - Audio
src/js_api/ath_sound.c - MPEG video
src/mpeg_player.c
System and input
- System and files
src/js_api/ath_system.c - Archive extraction
src/js_api/ath_archive.c - IOP management
src/iop_manager.c - Gamepad input
src/js_api/ath_pads.c - Keyboard input
src/js_api/ath_keyboard.c - Mouse input
src/js_api/ath_mouse.c
Connectivity
- HTTP and TLS
src/net/ath_http.c - TLS implementation
src/BearSSL/src/ssl/ssl_engine.c - Sockets and WebSockets
src/net/ath_ws.c
Other components
- JavaScript developer
Connections 21
- JavaScript developer → QuickJS engine: runs scripts
README.md - QuickJS engine → Built-in JS APIs: exposes APIs
README.md - Built-in JS APIs → 3D rendering: provides rendering
README.md - Built-in JS APIs → Screen control: provides screen control
README.md - Built-in JS APIs → 2D drawing: provides drawing
README.md - Built-in JS APIs → Images and textures: provides images
README.md - Built-in JS APIs → Tile maps: provides tile maps
README.md - Built-in JS APIs → Font rendering: provides text
README.md - Built-in JS APIs → Shadow projection: provides shadows
README.md - Built-in JS APIs → Audio: provides audio
README.md - Built-in JS APIs → MPEG video: provides video
README.md - Built-in JS APIs → System and files: provides system access
README.md - Built-in JS APIs → Archive extraction: provides extraction
README.md - Built-in JS APIs → IOP management: provides IOP control
README.md - Built-in JS APIs → Gamepad input: provides gamepad input
README.md - Built-in JS APIs → Keyboard input: provides keyboard input
README.md - Built-in JS APIs → Mouse input: provides mouse input
README.md - Built-in JS APIs → HTTP and TLS: provides web requests
README.md - HTTP and TLS → TLS implementation: uses TLS
README.md - Built-in JS APIs → Sockets and WebSockets: provides sockets
README.md - Built-in JS APIs → Native compiler: offers compilation
README.md