Skip to content

robfernan/PS2-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

🕹️ PS2-Programming

"Engineering Modern Systems on Legacy Hardware"

Language Platform

This repository contains a comprehensive collection of technical modules and examples for PlayStation 2 development using AthenaEnvJS. My work focuses on expanding and documenting the capacity of this environment to bridge modern JavaScript logic with legacy GS/VU1 hardware.


⚡ Why JavaScript on PS2?

AthenaEnvJS isn't just a wrapper; it's a high-performance environment that makes retro development accessible:

  • FPU Optimized: Uses specialized float32 semantics tailored for the PS2's 32-bit hardware.
  • Native Performance: Leverages an Ahead-Of-Time (AOT) compiler to translate complex math functions directly into MIPS R5900 machine code.
  • Modern Workflow: Use ES6+ syntax to manage VRAM, sprites, and SPU2 audio processes without the traditional overhead of legacy C toolchains.

🔗 Official Framework & Ecosystem

For those interested in the underlying framework or official documentation, please visit:


🧱 Module Overview (Completed ✅)

These nine modules represent a verified foundation of systems engineering on real PS2 hardware.

Module Goal & Focus Preview
01: Hello World Display "Nero.JS: System Ready" with custom colors and fonts.
02: Input Debug Full DualShock 2 controller mapping with real-time display.
03: UI Components Functional menu system with selection logic and input debouncing.
04: Audio Engine Stream 16-bit PCM WAV audio using the PS2 SPU2 processor.
05: XMB Wave Animated procedural background inspired by the PlayStation XMB. XMB Wave
06: Sprite System Load PNG images into VRAM and render 2D sprites.
07: Save System JSON-based data saving to physical/virtual Memory Cards.
08: Physics Platformer engine with gravity and pixel-perfect collision. Physics Demo
09: Scene Mgmt State machine for Title, Game, and Pause transitions. See Below

Scene Management Preview


🚀 Getting Started

  1. Emulator: Use PCSX2 (v1.7+ recommended).
  2. Setup: Under Settings > Emulation, ensure "Enable host filesystem" is checked.
  3. Run: Boot the athena.elf file and point it toward the script directory of the module you wish to test.

🔮 Future Vision: The Universal Workflow

My long-term goal is to merge these low-level retro modules into a unified, cross-platform pipeline. The objective is a single codebase that can be deployed across modern and legacy systems simultaneously.

Target Ecosystem

  • Modern: Web (HTML/CSS/JS), Desktop (NW.js), and Mobile (Capacitor).
  • Legacy: PlayStation 2 (Active), PS1, PSP, PS3, Dreamcast, and Game Boy.

Universal Boilerplate Concept

while (true) {
    // This loop is translated by the Framework into:
    // PS2: Screen.flip() | Web: requestAnimationFrame() | Mobile: Canvas Draw
    Screen.clear(black);
    font.print(10, 10, "SYSTEM READY: CROSS-PLATFORM", white);
    Screen.flip();
}

Happy Hacking! *Created by Robert Fernandez*

About

PS2-Programming: A comprehensive collection of examples and technical modules for PlayStation 2 development. Focused on expanding and documenting the capabilities of the AthenaEnvJS runtime, bridging modern JavaScript logic with legacy GS/VU1 hardware.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors