# Codebase Structure

**Analysis Date:** 2026-05-01

## Top-Level Layout

This repo has two real top-level directories. There is no build system, no `package.json`, no source tree being compiled. The entire repository is preservation material plus the research wiki built around it.

```
rebno/
├── .gitignore
├── decomp/                                 # Reverse-engineering research (the active product)
│   ├── GameMaker 5.3a Reverse Engineering Pipeline.md   # Long-form source report
│   └── wiki/                               # 19 short cross-linked Markdown pages
└── legacy/                                 # Original-game artifact archive (the input corpus)
    ├── README.md                           # Provenance + bucket index for everything below
    ├── .mirror.js                          # Node mirror script (original pull)
    ├── .mirror-fix.js                      # Node mirror script (refetch for name-less files)
    ├── .mirror-report.json                 # Per-bucket fetch results
    ├── open-source-release/                # 22 MB — canonical 2014 public drop (Master 5-4a + Client 5-8)
    ├── open-source-release-extras/         # 9 MB — sibling files: dup client + GM 5.3a IDE installer
    ├── source-archive/                     # 269 MB — full GM source/binary version history
    ├── servers/                            # 115 MB — three live-server snapshots from two machines
    ├── unity-project/                      # 324 MB — abandoned Unity port ("BNO Successor"), 2014–2017
    ├── maya-project/                       # 39 MB — megaman rig + tile library, 2014–2016
    └── audio/                              # MIDI music + a single VO mp3
```

## Directory Tree (depth ≤ 3, annotated)

### `decomp/` — Reverse-Engineering Knowledge Base

```
decomp/
├── GameMaker 5.3a Reverse Engineering Pipeline.md   # Source long-form report; the wiki is derived from this
└── wiki/
    ├── README.md                           # Task-keyed jump table; read this first
    ├── 00-overview.md                      # Engine history, scope, why 5.3a is unique
    ├── 01-runner-architecture.md           # Appended payload model, Delphi 5 stub, no CLI
    ├── 02-encryption.md                    # XOR cipher, runner-as-decryption-oracle flaw
    ├── 03-gmd-format.md                    # Binary layout, serialization block table
    ├── 04-dnd-serialization.md             # Drag-and-Drop action node binary format
    ├── 05-gml-vm.md                        # Stack VM, interpreter perf characteristics
    ├── 06-gml-syntax-5x.md                 # 4.3 → 5.x breaking syntax changes
    ├── 07-gml-core-functions.md            # collision_line, sprite_add_alpha, external_define
    ├── 08-39dll-networking.md              # TCP/UDP via 39dll, packet workflow
    ├── 09-tool-gmd-recovery.md             # VBGAMER45 dynamic memory decompiler
    ├── 10-tool-gm-decompiler-v21.md        # Java static decompiler
    ├── 11-tool-lateralgm.md                # Open-source .gmd parser/editor
    ├── 12-tool-gmksplitter.md              # Monolithic-to-VCS-friendly tree converter
    ├── 13-modern-tool-incompat.md          # UTMT / Altar.NET / FORM-chunk gap
    ├── 14-gb1-backups.md                   # Auto-backup rotation .gb1–.gb9
    ├── 15-extraction-pipeline.md           # Ranked methodology (4 tiers) — start-here for extraction
    ├── 16-bno-bnb-notes.md                 # Proprietary save/data format strategy
    ├── glossary.md
    └── quick-reference.md                  # Task-based jump table (alt to README)
```

### `legacy/open-source-release/` — Canonical 2014 Drop

```
open-source-release/
├── BN Online Master 5-4a.exe               # Canonical SERVER binary
├── BN Online Master 5-4.gmd                # Canonical SERVER source (open in GM 5.3a IDE)
├── BN Online Client 5-8.exe                # Canonical CLIENT binary
├── BN Online Client 5-8.gmd                # Canonical CLIENT source
├── 39dll.dll                               # TCP/IP transport (Game Maker DLL by 39ster)
├── BN Online Message ID's Table.xls        # Wire-protocol opcode reference
├── ,ServerCommands.txt                     # Operator keybinds (Ctrl+E exec, Ctrl+Q inspect, etc.)
├── Server Saver.exe                        # Watchdog
├── Crasher (Test With Server Saver).exe    # Failure-injection companion
├── BNO Master Insignia.bmp                 # Branding
├── BNO Master Insignia GrayBk.bmp
├── DebugLog.txt                            # Runtime log sample
├── server_log.txt                          # Runtime log sample
├── localList.txt                           # Connection list
├── MSettings.bno                           # Master settings (proprietary .bno)
├── MB_Log.bnb                              # Message-board log (proprietary .bnb) — note: OSR wiped history
└── UserData/                               # Sample world state (see breakdown below)
    ├── Areas (VOID)/                       # Areas variant
    ├── Areas_0.bnu  …  Areas_10.bnu        # Per-area data (.bnu)
    ├── HXB/                                # Bridge / connection data
    ├── HXB Backup 09-09/                   # Dated backup
    ├── Inv/                                # Inventory data
    ├── Inv Backup 09-09/                   # Dated backup
    └── MB_News/                            # Message-board posts (News_*.bnu)
```

### `legacy/open-source-release-extras/`

```
open-source-release-extras/
├── BN Online Client 5-8.exe                # Duplicate of OSR client (deliberate)
└── Game Maker 5.3a/
    ├── gmaker5.3a.zip                      # IDE installer — required to open .gmd files
    └── registration.txt
```

### `legacy/source-archive/` — Full Version History

```
source-archive/
├── BN Online Client.gmd / .gb1                       # Client v1 (2008-02-07)
├── BN Online Client 2…4 .exe / .gmd / .gb1           # Client v2–v4 (2008-02)
├── BN Online Master.gb1                              # Master v1
├── BN Online Master 2.exe / .gb1                     # Master v2
├── BN Online Master 3.gb1
├── BNO Master Fuse I.gmd / .gb1                      # Special variant
├── Settings.bno
├── BNO_Server/                                       # 2008 master tree (v2 → v4)
│   ├── BN Online Master 2.gmd
│   ├── BN Online Master 3.gb1 / .gmd
│   ├── BN Online Master 4-5.gmd                      # Interim 2008-05
│   ├── BN Online Master 4.exe / .gb1 / .gmd
│   ├── BN Online Master.gmd
│   ├── MB_Log.bnb / MSettings.bno / User_DB.bnu
│   └── UserData/
└── BNO/                                              # Bulk 2009–2010 history
    ├── BN Online Client 5-01 (EarlyColorBeta).exe
    ├── BN Online Client 5-01 / 5-1 / 5-2 / 5-2J / 5-3 / 5-4 / 5-5 / 5-6 / 5-6 TSide Revamp / 5-7 / 5  ← .exe + .gmd + .gb1 trios
    ├── BN Online Message ID's Table.xls
    ├── BNO_C5-3.zip / BNO_C5-6.zip                   # Zipped releases
    ├── BNO_Server 4-12-09.zip                        # Zipped server release
    ├── BNO_Server/                                   # 2009 master dev tree (v4-01 → v5-3, incl. 5-2 DEBUG)
    │   ├── BN Online Master 4-01 / 4 / 5 / 5-1 / 5-2 / 5-2 DEBUG / 5-3 .exe / .gb1 / .gmd
    │   ├── Account Updater.exe / Accounts Reloader.exe
    │   ├── BNO Master Files (J)/                     # Japanese branch
    │   ├── DebugLog.txt / Mrah.txt / MB_Log.bnb / MSettings.bno
    │   ├── Old Idea Txts/                            # Design-doc scratch
    │   ├── User_DBUpdated.bnu / User_DB_Superweird.bnu
    │   ├── localList.txt / remoteList.txt
    │   └── UserData/
    ├── BNO Data/                                     # Client-side data: 39dll.dll, Menu/, Settings.bno
    ├── Navi Sprites/                                 # NaviRunD/R/U + NaviStandD/R/U BMPs
    ├── Battle Network *.psd                          # ~20 PSDs: insignia, logo, sigs, loading splashes
    ├── Pre Background - BNO *.psd / .jpg / .png      # Pre-launch background art
    ├── Inventory Background Final{,2}.bmp
    ├── inventorybg.psd / InventoryBackgroundLayoutSample.bmp
    ├── BNO_Icon.bmp / .gif / BNO_IconF.ico / BNO_IconRot.bmp
    ├── BNO_Master_Icon.bmp / BNO_Master_IconF.ico / BNO_Master_IconRot.bmp
    ├── BNO Sig Unrestricted.jpg / BNOSigHeight150.jpg / BNO_Triotone_Insignia.jpg
    ├── mmbn-logo.jpg / mb_rcollapse.gml / mb_tcollapse.gml / mb_trise.gml   # Loose GML scratch
    ├── take-a-break.exe / GM Games.lnk / Thumbs.db
    └── Battle Network Online Loading Splash (Week 4).jpg / Logo.jpg
```

### `legacy/servers/` — Live-Server Snapshots

```
servers/
├── enlyzeam-current/                       # 2021 refresh of E:\GM Games\BNO_Server (richest user data + MB logs)
│   ├── ,2021_Note_About_Sources.txt        # Creator's verbatim note on which drives sourced what
│   ├── BN Online Master 5-4a.exe           # Active runtime server
│   ├── BN Online Client 5-7.exe / 5-8.exe  # Bundled client builds
│   ├── BN Online Master 5-3.exe
│   ├── 39dll.dll
│   ├── Account Updater.exe / Old Account Updater.exe / Old Accounts Reloader.exe
│   ├── Server Saver.exe / Server Saver (Old).exe / Crasher.exe
│   ├── Ctrl+O Codes.txt                    # Operator code reference
│   ├── DebugLog.txt / server_log.txt / Server_Status.txt / Mrah.txt
│   ├── BNO Master Files (J)/               # Japanese variant master files
│   ├── BNO Master Insignia.bmp / .GrayBk.bmp
│   ├── BNO Data/                           # Client-side data referenced by bundled clients
│   ├── Menu/                               # Menu_<row>-<col>.bmp tile sheet (~80+ BMPs)
│   ├── Old Idea Txts/                      # Design scratch
│   ├── MSettings.bno / Settings.bno / MB_Log.bnb
│   ├── localList.txt / remoteList.txt
│   └── UserData/                           # Same Areas/HXB/Inv/MB_News structure as OSR
├── enlyzeam-archive/                       # Older D:\BNO_Server snapshot (~2013–2017)
│   ├── (same file inventory pattern as enlyzeam-current; older versions retained)
│   ├── BN Online Master 5-1 / 5-2 / 5-2 DEBUG / 5-3 / 5 .exe       # Older masters
│   ├── BN Online Client 5-01 / 5-7 .exe
│   ├── BN Online Master 4 .exe / .gb1 / .gmd / 4-01 .exe
│   ├── User_DBUpdated.bnu
│   └── UserData/
└── local-current/                          # FRAGZON E:\BNO Official Server
    ├── BNO_Server/                         # Self-contained server bundle (39dll, master 4 → 5-4a, all utilities)
    ├── BNO_Server 4-12-09.zip              # Zipped 2009 release
    ├── APCgrwarped.jpg                     # Loose image
    ├── Ctrl+O Codes.txt
    └── RealVNC Enterprise Edition 4.4.2 (Keygen by ZWT)/   # Historical admin-tool dir; do not redistribute
```

### `legacy/unity-project/` — Abandoned Unity Port

```
unity-project/                              # Unity 5.x; working title "BNO Successor"; abandoned 2017-05
├── BNO Unity Project.sln                   # Primary solution
├── BNO Unity Project-csharp.sln            # C#-only solution variant
├── BNO Unity Project.userprefs
├── BNO Unity Project.CSharp.csproj
├── BNO Unity Project.CSharp.Editor.csproj
├── Assembly-CSharp.csproj / -vs.csproj / -Editor.csproj / -Editor-vs.csproj
├── *(BNO Successor's conflicted copy 2014-12-20 …).csproj   # Many Dropbox sync-conflict copies (retained)
├── *(BNO Successor's conflicted copy 2015-01-09).{csproj,sln,dwlt}
├── Assets/
│   ├── _Scripts/
│   │   ├── Networking/
│   │   │   ├── NetMenu.cs                  # Photon multiplayer menu
│   │   │   └── SerializePlayer.cs          # Player state serialization
│   │   ├── NuBNO np++ Session/             # Notepad++ session sidecar (left in tree)
│   │   ├── SectorTrigger.cs
│   │   ├── ShaderHeightControl.cs
│   │   ├── ShaderManager.cs
│   │   ├── SideTextureRotationTest.cs
│   │   └── TextureAnimator.cs
│   ├── _Scenes/
│   │   ├── test.unity
│   │   ├── test_new.unity
│   │   └── test (BNO Successor's conflicted copy 2015-01-09).unity
│   ├── _Models/                            # tileBasic.obj, tileDeep*.obj, tileSlope.obj, tilePortal.obj, tileCollider.obj, prefabs
│   │   ├── tileBasicSeparated/             # Per-side decomposition
│   │   ├── tileSlopeSeparated/
│   │   └── OLD_tileBasicSeparated/         # Legacy separated set
│   ├── _Animations/
│   ├── _Materials/                         # Underscore-prefixed convention
│   ├── _Shaders/
│   ├── _Textures/
│   ├── Materials/                          # Non-underscored sibling (older convention)
│   ├── Editor/
│   │   └── TileManager.cs                  # Editor-side tile management
│   ├── Player/
│   │   ├── Player.prefab / Player 1.prefab
│   │   └── Scripts/
│   ├── Platforms/
│   ├── Plugins/
│   │   ├── Photon3Unity3D.dll              # Multiplayer transport
│   │   ├── Photon3Unity3D.dll.mdb / .pdb / .xml
│   │   └── *.meta
│   ├── Mahjong Table.prefab                # One-off scene element
│   └── tileBasic_sidesTwoParallel.obj      # Loose tile asset at root of Assets/
├── ProjectSettings/                        # AudioManager, InputManager, Physics, Quality, etc. (~17 .asset files)
│   └── ProjectVersion.txt                  # Unity version pin
├── Library/                                # Unity asset cache (committed; many *conflicted copy* dirs)
├── obj/                                    # MSBuild intermediate
└── Test Builds/
    ├── Android/                            # Prebuilt APKs (~22 MB each)
    └── Windows/                            # Prebuilt .exe (16 MB) + .pdb (~138 MB)
```

### `legacy/maya-project/` — Asset Pipeline

```
maya-project/
├── workspace.mel                           # Maya project marker
├── scenes/
│   ├── megaman_rig.mb                      # Initial rig
│   ├── megaman_rig_v002.mb … v005.mb       # Rig iterations
│   ├── megaman_anim_v001.mb … v005.mb      # Animation iterations
│   ├── latlong_render.mb                   # Environment lat-long render scene
│   ├── dev/                                # Work-in-progress scenes
│   ├── source/                             # Source/reference scenes
│   └── export_to_unity/                    # OBJ exports → unity-project/Assets/_Models/
│       ├── tileBasic.obj / tileBasicSeparated.obj
│       ├── tileBasic_sidesOne / Two{Parallel,Corner} / Three / Four .obj
│       ├── tileBasic_top.obj / tileBasic_bottom.obj
│       ├── tileBasic_separated_2/
│       ├── tileDeep.obj / tileDeep_02.obj / tileDeep_02_middle.obj / tileDeep_03_middle.obj / tileDeep_Glass.obj
│       ├── tileSlope.obj / tileSlope_separated/
│       ├── tilePortal.obj / portalBasic.obj
│       └── tileCollider.obj
├── images/
│   ├── latlong_render__5320.exr / __7220.exr   # OpenEXR renders
│   ├── latlong_transform.nk / .nk~             # Nuke transform script
│   ├── tmp/
│   └── uv_snapshots/
└── sourceimages/                           # Texture PSDs/PNGs
    ├── tileBasic.psd / .png
    ├── tileDeep.psd / .png / tileDeep_Glass.psd / .png
    ├── tileSlope.psd / .png
    └── portalBasic.psd / .png
```

### `legacy/audio/`

```
audio/
├── bno-songs/                              # 10 MIDI files (game music)
│   ├── EXE1Den.mid
│   ├── MMBN5HeroThemeGM.mid / MMBN5InternetGM.mid / MMBN5VictoryGM.mid
│   ├── cyberworld.mid
│   ├── hm-exe3sad.mid / hm-exe3wwwtheme.mid
│   ├── mmbn3_Alpha_Blue.mid / mmbn3_Net-Areas_Blue-v2.mid
│   └── mmbn4_Net-Areas_Blue-v2.mid
└── quotes/
    └── Zig Zag or Joog Jaug_.mp3           # Brandon Smith VO clip
```

## Directory Purposes (quick lookup)

| Path | Purpose | Read this when… |
|---|---|---|
| `decomp/wiki/` | Reverse-engineering knowledge base | You need to extract `.gmd` from a `.exe`, parse a binary format, or evaluate a tool |
| `decomp/GameMaker 5.3a Reverse Engineering Pipeline.md` | Long-form research source | You want full prose context behind a wiki page |
| `legacy/README.md` | Archive provenance + bucket index | You need to know which physical machine a file came from |
| `legacy/open-source-release/` | Canonical 5-4a master + 5-8 client (with `.gmd` source) | You want to study or modify the final official build |
| `legacy/open-source-release-extras/Game Maker 5.3a/` | IDE installer | You need to open any `.gmd` natively |
| `legacy/source-archive/BNO/` | 2009–2010 client + master history | You need a specific historical version |
| `legacy/source-archive/BNO_Server/` (top-level) | 2008 master history | You're chasing the earliest behavior |
| `legacy/source-archive/BNO/BNO_Server/` | 2009 master dev tree (incl. `5-2 DEBUG`) | You want the last debug-symbol build |
| `legacy/servers/enlyzeam-current/` | 2021 server snapshot — richest UserData + MB logs | You need real message-board content or recent UserData |
| `legacy/servers/enlyzeam-archive/` | ~2013–2017 snapshot | You need older user state |
| `legacy/servers/local-current/` | FRAGZON snapshot | You need the most-recently-running operator state |
| `legacy/unity-project/Assets/_Scripts/` | The 11 C# scripts of the abandoned port | You're studying how BNO was being rebuilt in Unity |
| `legacy/unity-project/Assets/_Models/` | Tile geometry consumed by Unity scenes | You're tracing the asset pipeline |
| `legacy/maya-project/scenes/export_to_unity/` | Source `.obj` exports feeding Unity | You need to regenerate or modify tile geometry |
| `legacy/maya-project/scenes/megaman_rig*.mb` | Megaman 3D rig (v1–v5) | You want the rig source |
| `legacy/audio/bno-songs/` | In-game MIDI music | You need the soundtrack |
| `legacy/.mirror.js`, `.mirror-fix.js` | Reproducible mirror scripts | You want to re-pull the archive from source machines |

## Naming Patterns

**BNO build versioning (legacy):**
- Format: `BN Online <Role> <Version>.<ext>` where `<Role>` is `Client` or `Master`, `<Version>` uses dash-separated minor (`5-4`, `5-4a`, `5-2 DEBUG`, `5-6 TSide Revamp`).
- Triple per build where preserved: `.exe` (binary), `.gmd` (source — open in GM 5.3a IDE), `.gb1` (auto-rotation backup; `.gb1`–`.gb9` per `decomp/wiki/14-gb1-backups.md`).
- Notable: `5-4` client `.gmd` exists but was never compiled to `.exe` in any snapshot.

**BNO data file extensions:**
- `.bno` — settings (`MSettings.bno`, `Settings.bno`).
- `.bnb` — binary blob (`MB_Log.bnb` message-board log).
- `.bnu` — per-record user data (`Areas_<n>.bnu`, `News_<n>.bnu`, `Bridges_<n>.bnu`, `User_DB.bnu`).

**Wiki pages (`decomp/wiki/`):**
- Pattern: `<two-digit-order>-<kebab-case-topic>.md`. Two-digit prefix orders the table of contents; topics are domain keywords (`gmd-format`, `dnd-serialization`, `39dll-networking`, `gb1-backups`).
- Tool pages prefixed `<NN>-tool-<tool-name>.md` (e.g. `09-tool-gmd-recovery.md`, `11-tool-lateralgm.md`).
- Specials: `README.md`, `glossary.md`, `quick-reference.md` (no number prefix).

**Unity assets (`legacy/unity-project/Assets/`):**
- Underscore-prefixed top-level subfolders (`_Scripts/`, `_Scenes/`, `_Models/`, `_Materials/`, `_Animations/`, `_Shaders/`, `_Textures/`) — Unity convention to sort to the top of the Project view. A non-underscored `Materials/` sibling exists from an earlier convention.
- C# script files: PascalCase noun phrases (`SectorTrigger.cs`, `ShaderHeightControl.cs`, `TextureAnimator.cs`, `NetMenu.cs`, `SerializePlayer.cs`).
- `.meta` sidecars: every asset and folder has a `<name>.meta` file (Unity GUID/import settings); always commit the pair.
- Tile geometry: `tile<Kind>[_<variant>].obj` (`tileBasic.obj`, `tileDeep_02_middle.obj`, `tileBasic_sidesTwoParallel.obj`).
- Dropbox sync conflicts: `<original> (BNO Successor's conflicted copy YYYY-MM-DD[ (N)]).<ext>` — retained as historical record, do not delete.

**Maya scenes (`legacy/maya-project/scenes/`):**
- Pattern: `<subject>_<purpose>[_v<NNN>].mb` (`megaman_rig_v003.mb`, `megaman_anim_v005.mb`, `latlong_render.mb`).

**Server snapshots (`legacy/servers/`):**
- Folder pattern: `<machine>-<recency>` (`enlyzeam-current`, `enlyzeam-archive`, `local-current`).

**Operator/admin docs:** comma-prefix marks "pinned to top" by sort order in Windows Explorer (`,ServerCommands.txt`, `,2021_Note_About_Sources.txt`).

## Where to Add New Code / Content

**New wiki page on a 5.3a topic:**
- Location: `decomp/wiki/<NN>-<topic>.md` (next free two-digit order; tool pages prefer `<NN>-tool-<name>.md`).
- Update: add row to the "Full file index" and (if task-relevant) the "Start here by task" table in `decomp/wiki/README.md`.
- End each page with a **See also** section per the convention in `decomp/wiki/README.md`.

**New long-form research:**
- Append to or version `decomp/GameMaker 5.3a Reverse Engineering Pipeline.md`. Then derive wiki pages from new sections.

**Recovered `.gmd` from a previously source-less `.exe`:**
- Location: place next to the `.exe` in `legacy/source-archive/BNO/` or `legacy/source-archive/BNO_Server/` so the build triple (`exe`/`gmd`/`gb1`) lives together.
- Document the recovery method (which tier of `decomp/wiki/15-extraction-pipeline.md`) in a sibling `<basename>.recovery.md`.

**New decompilation/extraction tool:**
- Document the tool in `decomp/wiki/<NN>-tool-<name>.md`.
- If executable, place it in a new `tools/` directory at repo root (no such directory exists yet).

**New mirror target / re-pull:**
- Edit `legacy/.mirror.js` (or add `.mirror-<purpose>.js` sibling). Update `legacy/.mirror-report.json`. Update the provenance table in `legacy/README.md`.

**New analysis / planning docs:**
- `.planning/codebase/` (this directory) for codebase maps. `.planning/` for phase plans.

## Special Directories

**`decomp/wiki/`** — Active product. Cross-references via relative `.md` links.

**`legacy/unity-project/Library/`** — Unity-generated asset import cache. Normally `.gitignore`-d in a live Unity project; deliberately committed here as part of the preservation snapshot (includes Dropbox conflict copies that record collaboration history).

**`legacy/unity-project/Test Builds/Windows/`** — Includes ~138 MB of `.pdb` debug symbols. Useful for forensic analysis; do not strip.

**`legacy/source-archive/BNO/Navi Sprites/`** — Raw BMP sprite sheets (`NaviRunD.bmp`, `NaviStandUR.bmp`, etc.) plus `NaviSpriteCutExample.bmp` and `NaviStand+Run-AllNecessaryFrames.bmp` showing the cutting layout. The source-of-truth for character animation frames if regenerating.

**`legacy/servers/*/UserData/`** — Real player save state. Treat as PII-adjacent if any user identifiers are present; do not redistribute outside the preservation context.

**`legacy/servers/local-current/RealVNC Enterprise Edition 4.4.2 (Keygen by ZWT)/`** — Cracked admin software preserved as historical artifact of the live-server host. Do not redistribute.

**`legacy/.mirror*.js` and `.mirror-report.json`** — Hidden by leading dot. These are the only files in the entire archive that are "code" in the operational sense.

**`legacy/source-archive/BNO/BNO_Server/Old Idea Txts/`** and `Mrah.txt`, `take-a-break.exe` — Loose creator scratch / easter eggs preserved as-is.

---

*Structure analysis: 2026-05-01*
