# ryanfoxeth/tmnt-sfii-turbo architecture

> Architecture diagram of the GitHub repository ryanfoxeth/tmnt-sfii-turbo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ryanfoxeth/tmnt-sfii-turbo
- Repository: https://github.com/ryanfoxeth/tmnt-sfii-turbo

## Overview

This repository distributes a fan-made TMNT visual overhaul for Street Fighter II Turbo and an offline patcher. The main workflow is to supply a supported original or earlier release, let the patcher select and verify the required BPS patch, and save the resulting v29 ROM for play in an SNES emulator. The patch artifacts carry the game changes: roster and stages, interface and costumes, endings, and voice/effect updates. The excerpts show the patcher and BPS engine; artifact-level feature details come from the README, not inspected patch internals.

Main entry points: [`patches`](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches) (Versioned patches), [`apply_patch.py`](https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/apply_patch.py) (Patch selector), [`bps.py`](https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/bps.py) (BPS engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patching["Offline patching"]
  node_patcher["Patch selector<br/>[apply_patch.py]"]
  node_bps["BPS engine<br/>[bps.py]"]
  node_result_rom["v29 ROM"]
end

subgraph group_artifacts["Patch artifacts"]
  node_patch_files["Versioned patches"]
end

subgraph group_game["Game overhaul"]
  node_roster_stages["Roster and stages"]
  node_interface_costumes["Interface and costumes"]
  node_endings["Endings and credits"]
  node_voices_effects["Voices and effects"]
end

node_player(("Player"))
node_source_rom["Supported ROM"]
node_emulator["SNES emulator"]
node_flips["Floating IPS"]

node_player -->|"supplies"| node_source_rom
node_player -->|"runs"| node_patcher
node_source_rom -->|"reads"| node_patcher
node_patcher -->|"selects and reads"| node_patch_files
node_patcher -->|"applies patch"| node_bps
node_patch_files -->|"patch data"| node_bps
node_bps -->|"returns patched bytes"| node_patcher
node_patcher -->|"writes"| node_result_rom
node_result_rom -->|"opens"| node_emulator
node_patch_files -->|"implements"| node_roster_stages
node_patch_files -->|"implements"| node_interface_costumes
node_patch_files -->|"implements"| node_endings
node_patch_files -->|"implements"| node_voices_effects
node_player -.->|"may apply full BPS"| node_flips
node_patch_files -.->|"supplies BPS file"| node_flips

click node_patcher "https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/apply_patch.py"
click node_bps "https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/bps.py"
click node_patch_files "https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches"
click node_roster_stages "https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches"
click node_interface_costumes "https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches"
click node_endings "https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches"
click node_voices_effects "https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches"

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_patcher,node_bps,node_result_rom toneBlue
class node_patch_files toneAmber
class node_roster_stages,node_interface_costumes,node_endings,node_voices_effects toneMint
class node_player,node_source_rom,node_emulator,node_flips toneIndigo
```

## Components

### Offline patching

- [Patch selector](https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/apply_patch.py): `apply_patch.py`
- [BPS engine](https://github.com/ryanfoxeth/tmnt-sfii-turbo/blob/main/bps.py): `bps.py`
- **v29 ROM**

### Patch artifacts

- [Versioned patches](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches): `patches`

### Game overhaul

- [Roster and stages](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches): `patches`
- [Interface and costumes](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches): `patches`
- [Endings and credits](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches): `patches`
- [Voices and effects](https://github.com/ryanfoxeth/tmnt-sfii-turbo/tree/main/patches): `patches`

### Other components

- **Player**
- **Supported ROM**
- **SNES emulator**
- **Floating IPS**

## Connections

- Player → Supported ROM: supplies
- Player → Patch selector: runs
- Supported ROM → Patch selector: reads
- Patch selector → Versioned patches: selects and reads
- Patch selector → BPS engine: applies patch
- Versioned patches → BPS engine: patch data
- BPS engine → Patch selector: returns patched bytes
- Patch selector → v29 ROM: writes
- v29 ROM → SNES emulator: opens
- Versioned patches → Roster and stages: implements
- Versioned patches → Interface and costumes: implements
- Versioned patches → Endings and credits: implements
- Versioned patches → Voices and effects: implements
- Player → Floating IPS: may apply full BPS
- Versioned patches → Floating IPS: supplies BPS file
