# jessetbh/wwfnomercyrecomp architecture

> Architecture diagram of the GitHub repository jessetbh/wwfnomercyrecomp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jessetbh/wwfnomercyrecomp
- Repository: https://github.com/jessetbh/wwfnomercyrecomp

## Overview

WWF No Mercy: Recompiled is a native PC port of one specific N64 game, built around static recompilation and the N64ModernRuntime/RT64 stack. Its main flow is launching the port, loading the original ROM, and running the game with modern rendering, input, audio, and persistent flash saves. The repository also contains an optional RetroAchievements integration. The README documents several runtime capabilities whose implementation is not represented in the sampled excerpts; those links are cited as documentation rather than inferred source calls.

Main entry points: [`src/main/main.cpp`](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp) (Port entry), [`src/game/recomp_api.cpp`](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/game/recomp_api.cpp) (Recompiled game), [`src/ra/ra_client.cpp`](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/ra_client.cpp) (RA adapter), [`src/ra/rcheevos/src/rc_client.c`](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rc_client.c) (Achievement client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and game"]
  node_entry["Port entry<br/>[main.cpp]"]
  node_recomp["Recomp runtime"]
  node_game["Recompiled game<br/>[recomp_api.cpp]"]
end

subgraph group_runtime["Runtime services"]
  node_ui["Menus and config"]
  node_render["Rendering<br/>[main.cpp]"]
  node_input["Input<br/>[main.cpp]"]
  node_audio["Audio<br/>[main.cpp]"]
  node_flash[("Flash saves")]
end

subgraph group_achievements["RetroAchievements"]
  node_ra_adapter["RA adapter<br/>[ra_client.cpp]"]
  node_ra_client["Achievement client<br/>[rc_client.c]"]
  node_ra_runtime["Achievement runtime<br/>[runtime.c]"]
  node_ra_api["Web API<br/>[rc_api_common.c]"]
end

node_player(("Player"))
node_rom["Original ROM"]
node_server(("RetroAchievements server"))

node_player -->|"launches"| node_entry
node_rom -->|"loads"| node_entry
node_entry -->|"starts"| node_recomp
node_recomp -->|"runs"| node_game
node_entry -->|"configures"| node_render
node_entry -->|"configures"| node_input
node_entry -->|"configures"| node_audio
node_player -->|"configures"| node_ui
node_game -->|"persists saves"| node_flash
node_game -->|"provides memory"| node_ra_adapter
node_ra_adapter -->|"calls"| node_ra_client
node_ra_client -->|"evaluates"| node_ra_runtime
node_ra_client -->|"uses requests"| node_ra_api
node_ra_adapter -->|"sends HTTP"| node_server

click node_entry "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp"
click node_game "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/game/recomp_api.cpp"
click node_ui "https://github.com/jessetbh/wwfnomercyrecomp/tree/main/src/main"
click node_render "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp"
click node_input "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp"
click node_audio "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp"
click node_flash "https://github.com/jessetbh/wwfnomercyrecomp/tree/main/src/main"
click node_ra_adapter "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/ra_client.cpp"
click node_ra_client "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rc_client.c"
click node_ra_runtime "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rcheevos/runtime.c"
click node_ra_api "https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rapi/rc_api_common.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_recomp,node_game toneBlue
class node_ui,node_render,node_input,node_audio,node_flash toneAmber
class node_ra_adapter,node_ra_client,node_ra_runtime,node_ra_api,node_server toneMint
class node_player,node_rom toneIndigo
```

## Components

### Launch and game

- [Port entry](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp): `src/main/main.cpp`
- **Recomp runtime**
- [Recompiled game](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/game/recomp_api.cpp): `src/game/recomp_api.cpp`

### Runtime services

- [Menus and config](https://github.com/jessetbh/wwfnomercyrecomp/tree/main/src/main): `src/main`
- [Rendering](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp): `src/main/main.cpp`
- [Input](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp): `src/main/main.cpp`
- [Audio](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/main/main.cpp): `src/main/main.cpp`
- [Flash saves](https://github.com/jessetbh/wwfnomercyrecomp/tree/main/src/main): `src/main`

### RetroAchievements

- [RA adapter](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/ra_client.cpp): `src/ra/ra_client.cpp`
- [Achievement client](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rc_client.c): `src/ra/rcheevos/src/rc_client.c`
- [Achievement runtime](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rcheevos/runtime.c): `src/ra/rcheevos/src/rcheevos/runtime.c`
- [Web API](https://github.com/jessetbh/wwfnomercyrecomp/blob/main/src/ra/rcheevos/src/rapi/rc_api_common.c): `src/ra/rcheevos/src/rapi/rc_api_common.c`

### Other components

- **Player**
- **Original ROM**
- **RetroAchievements server**

## Connections

- Player → Port entry: launches (evidence: `README.md`)
- Original ROM → Port entry: loads (evidence: `README.md`)
- Port entry → Recomp runtime: starts (evidence: `README.md`)
- Recomp runtime → Recompiled game: runs (evidence: `README.md`)
- Port entry → Rendering: configures (evidence: `src/main/main.cpp`)
- Port entry → Input: configures (evidence: `src/main/main.cpp`)
- Port entry → Audio: configures (evidence: `src/main/main.cpp`)
- Player → Menus and config: configures (evidence: `README.md`)
- Recompiled game → Flash saves: persists saves (evidence: `README.md`)
- Recompiled game → RA adapter: provides memory (evidence: `src/ra/ra_client.cpp`)
- RA adapter → Achievement client: calls (evidence: `src/ra/ra_client.cpp`)
- Achievement client → Achievement runtime: evaluates (evidence: `src/ra/rcheevos/src/rc_client.c`)
- Achievement client → Web API: uses requests (evidence: `src/ra/rcheevos/src/rc_client.c`)
- RA adapter → RetroAchievements server: sends HTTP (evidence: `src/ra/ra_client.cpp`)
