Skip to content

ARCHITECTURE.md - SYSTEM ARCHITECTURE & TECHNICAL CORE

This document defines the technical structure, emulated platforms and software layers of The Chronicles of Ultimate Retro Station project.


1. DEVICE ARCHITECTURE (HARDWARE STACK)

The system is built around a modified Nintendo Wii console, which acts as a host for several emulation layers.

Floor Component / Technology
Host Machine Nintendo Wii (RVL-001)
Processor IBM Broadway (PowerPC 750CL) @ 729 MHz
Graphics ATI Hollywood GPU @ 243 MHz
Save 250GB SSD (External USB via Custom Interface)
Case WII-64 CHASSIS Custom Mod
Network Local / Crypto-secured Node

2. SYSTEM HISTORY (1977 - 2006)

The system is configured to support the following hardware architectures in chronological order:

Year Device Manufacturer Architecture
1977 Apple II Apple 8-bit
1977 Commodore PET Commodore 8-bit
1979 Atari 800 Atari 8-bit
1980 Commodore VIC-20 Commodore 8-bit
1982 Commodore 64 Commodore 8-bit
1982 Sinclair ZX Spectrum Sinclair 8-bit
1983 Nintendo NES Nintendo 8-bit
1983 MSX Standard Various 8-bit
1984 Amstrad CPC Amstrad 8-bit
1984 Commodore Plus/4 Commodore 8-bit
1985 Commodore Amiga 500 Commodore 16/32-bit
1985 Commodore 128 Commodore 8/16-bit
1988 SEGA Mega Drive SEGA 16-bit
1990 Nintendo SNES Nintendo 16-bit
1994 Sony PlayStation Sony 32-bit
1996 Nintendo 64 Nintendo 64-bit
2001 Nintendo GameCube Nintendo Native/HW
2006 Nintendo Wii (Host) Nintendo PowerPC

3. SOFTWARE LAYERS (SOFTWARE STACK)

Emulation and native driving are divided into three main layers:

A. Kernel & Boot

  • IOS/cIOS: Custom IOS interfaces (d2x) enable SSD connection and read speed optimization.
  • Priiloader: Protection against "bricking" and direct boot to custom loaders.

B. Loaders & Engines

  • USB Loader GX: The primary interface for Wii and GameCube games.
  • Nintendont: Native-level GameCube engine that enables SSD support and controller conversions.
  • Dolphin SDK Integrations: Development tools for code compilation and testing.

C. Emulation Cores

  • RetroArch: Universal interface for 8-bit and 16-bit systems.
  • WiiStation: Optimized MIPS architecture (PS1) interpreter.
  • UAE4Wii: Separate engine for emulating Amiga architecture.

4. TECHNICAL OBSERVATIONS AND OPTIMIZATION

  • Audio: Original sound circuits (eg SID, Paula) are emulated at the DSP level to minimize latency.
  • Video: System prefers native 240p output over analog signal to ensure CRT compatibility.
  • Input: HID compatibility allows modern controllers to be used in classic environments.

Technology map of Wii development

This document describes the key tools, libraries and workflow needed to create your own software (Homebrew) for the Nintendo Wii.


Technology Layers

graph TD
    subgraph "1. Development Environment"
        A[VS Code / IDE] -->|Write C/C++| B(Source Code)
        B --> C{devkitPPC}
        D[libogc / GRRLIB] --> C
        C -->|Compile| E[Game Binary .dol]
    end

    subgraph "2. Testing"
        E --> F[Dolphin Emulator]
        F -->|Debug| A
    end

    subgraph "3. Assets"
        G[Blender / GIMP] --> H[Raw Assets]
        H --> I[Converters]
        I -->|Headers| B
    end

    subgraph "4. Real Wii"
        E --> J{Wiiload}
        J --> K[Homebrew Channel]
        K --> L[Wii Hardware]
        M[Wiimote] -->|Input| L
    end

    %% Värien määrittely (varmista yhteensopivuus)
    style A fill:#3b3f5c,stroke:#ccc,stroke-width:2px
    style E fill:#4e5d94,stroke:#ccc,stroke-width:4px
    style F fill:#3a6ea5,stroke:#ccc,stroke-width:2px
    style L fill:#5c5c3d,stroke:#ccc,stroke-width:2px

LAYER 1: Hardware (Wii Console)

The physical foundation your code interacts with. * CPU: IBM PowerPC "Broadway" (729 MHz). * GPU: ATI "Hollywood" (243 MHz). * RAM: 24 MB (MEM1) + 64 MB (MEM2). Memory management is critical! * Input: Bluetooth (Wiimote), IR Sensor, Accelerometers.

LAYER 2: Toolchain & Low-Level

Tools that translate your code into Wii-compatible machine language. * devkitPPC: The C/C++ Compiler (part of the devkitPro suite). * libogc: The essential low-level library. It's the open-source alternative to Nintendo's official SDK, managing controllers, memory, and file system. * Makefile: Instructions for the Compiler on how to build and link your project.

LAYER 3: Graphics & APIs (Libraries)

High-level abstractions to simplify development. * GRRLIB: The most popular 2D/3D library for hobbyists. It simplifies texture loading and rendering. * GX: Wii's native low-level graphics API (similar to OpenGL). GRRLIB runs on top of this. * ASND / AESND: Libraries for audio and music playback. * Fatfs: Library for reading/writing data to the SD card.

LAYER 4: Environment & Testing (Workflow)

Where you write code and how you run it. * Editor: Visual Studio Code (recommended) or Code::Blocks. * Dolphin Emulator: The gold standard for testing. Use this for 99% of development. * Homebrew Channel: Required on a physical Wii to run your custom code. * Wiiload: A Utility to send your compiled game from PC to Wii over the network.

LAYER 5: Asset Pipeline

Games need Visuals and sound. * Blender: For 3D modeling. * GIMP / Photoshop: For texture creation. * PNG2TPL / ImageMagick: Tools to convert standard images into Wii-native formats (TPL). * Audacity: For Converting audio to PCM or OGG formats.