How blacklabelhq/symphonyrecomp works
Purpose and execution model
SymphonyRecomp is a .NET 10 recompilation-based modern PC port of the North American PSX version of *Castlevania: Symphony of the Night*. It statically recompiles legally supplied disc assets, then builds a patched native/game-facing runtime. Primary entry points are Program.cs and the project file RecompOne.SoTN.csproj; launch/build scripts include windows_run.bat and run.sh.
Recompilation input boundary
The build consumes user-provided BIN/CUE game media under disc/, whose expected contract is documented in disc/README.md. RecompOne uses the title definition in config/sotn.json to drive static recompilation. This is the critical boundary between copyrighted game data and repository-owned C# patches/configuration.
Generated-game integration layer
wrapers/ is the main abstraction boundary over recompiled game state, entities, memory/API calls, and game concepts. Higher-level patches should use these wrappers rather than direct generated-code assumptions. Core representations include wrapers/GameApi.cs, wrapers/Game.cs, and wrapers/Stage.cs; player, inventory, map, progress, items, and relics are similarly exposed here.
Runtime event orchestration
Event modules attach mod behavior to game lifecycle, level transitions, rendering, and display changes. events/GameLifecycleEvents.cs, events/LevelEvents.cs, and events/RenderEvents.cs form the control-flow hooks through which patches initialize, update, and draw. events/DisplayModeEvents.cs handles display-specific coordination.
Game patches and feature modules
Feature code is grouped by intervention domain:
• Randomizer generation, UI, and persistence: patches/rando/Randomizer.cs, patches/rando/RandoPatch.cs, patches/rando/SaveLoadManager.cs.
• Tracker/map overlays and collected-item state: patches/tracker/Tracker.cs, patches/tracker/MapChecks.cs, patches/tracker/TrackerOverlayPanel.cs.
• Cheats and interactive panels: patches/cheats/Cheats.cs, patches/cheats/CheatMenu.cs.
• General fixes and quality-of-life changes: patches/qol/QualityOfLife.cs, patches/qol/FunctionFixes.cs.
• Extension room-fill behavior: patches/extension/RoomFill.cs.
Widescreen rendering adaptation
Widescreen support is a cross-cutting rendering/gameplay patch set, not merely a display option. patches/widescreen/WidescreenPatch.cs coordinates camera, HUD, effects, spawning, transitions, hit detection, and scene-specific corrections. Key bounds and compatibility controls are patches/widescreen/ScreenBounds.cs and patches/widescreen/VanillaGuard.cs; camera/transition work resides in patches/widescreen/CameraWidescreenPatch.cs and patches/widescreen/RoomTransitionPatch.cs.
Static configuration and assets
Function maps map recompiled functions across game executable/stage domains, with common definitions in config/funcmaps/main.json and per-stage files such as config/funcmaps/dra.json and config/funcmaps/stcat.json. Runtime feature assets include room-fill metadata at assets/extension/room_fills.json, language metadata at assets/languages.json, plus map/tracker assets under assets/map/ and assets/tracker/.
Runtime dependencies and delivery
The runtime requires .NET 10, OpenGL 2.1-capable graphics, and OpenAL audio. Menu/about/update and disc validation concerns are isolated in misc/GameMenu.cs, misc/AutoUpdater.cs, and misc/DiscCheck.cs. GitHub Actions build and publish releases via .github/workflows/build.yml and .github/workflows/release.yml.
Main entry points: GameLifecycleEvents.cs Lifecycle event hooks · GameApi.cs Game wrapper layer · Program.cs Recomp build entry · Tracker.cs Tracker and map overlay
Components 19
Recompilation Inputs
User media and static function mappings drive recompilation.
- Supplied PSX media · Legally supplied BIN/CUE input.
- Disc contract
disc/README.md - Title definition
config/sotn.json - Function maps · Common and per-stage executable mappings.
config/funcmaps/main.json
Runtime Core
Repository-owned integration and lifecycle control.
- Recomp build entry · Static recompilation and patched runtime entry point.
Program.cs - Project definition
RecompOne.SoTN.csproj - Recompiled game runtime · Game-facing output produced from media and mappings.
- Game wrapper layer · Stable access to game state, entities, memory, and APIs.
wrapers/GameApi.cs - Lifecycle event hooks · Initialization, level, render, and display hooks.
events/GameLifecycleEvents.cs - Menu and runtime services · Menu, update, and disc-validation concerns.
misc/GameMenu.cs
Patch Modules
Gameplay, UI, rendering, and extension features.
- Randomizer · Generation, runtime patching, and save/load behavior.
patches/rando/Randomizer.cs - Tracker and map overlay · Collected-item state, map checks, and overlay UI.
patches/tracker/Tracker.cs - Cheats UI
patches/cheats/Cheats.cs - QoL and fixes
patches/qol/QualityOfLife.cs - Room fill extension
patches/extension/RoomFill.cs - Widescreen adaptation · Coordinates camera, HUD, effects, transitions, and compatibility guards.
patches/widescreen/WidescreenPatch.cs - Feature assets · Room-fill, language, map, and tracker metadata.
assets/extension/room_fills.json
Delivery
Build and release automation.
- Build workflow
.github/workflows/build.yml - Release workflow
.github/workflows/release.yml
Connections 22
- Disc contract → Supplied PSX media: specifies
- Supplied PSX media → Recomp build entry: recompilation input
- Title definition → Recomp build entry: defines title
- Function maps → Recomp build entry: maps functions
- Project definition → Recomp build entry: builds
- Recomp build entry → Recompiled game runtime: produces/integrates
- Recompiled game runtime → Game wrapper layer: game state and APIs
- Game wrapper layer → Lifecycle event hooks: supports hooks
- Lifecycle event hooks → Randomizer: drives
- Lifecycle event hooks → Tracker and map overlay: drives
- Lifecycle event hooks → Cheats UI: drives
- Lifecycle event hooks → QoL and fixes: drives
- Lifecycle event hooks → Room fill extension: drives
- Lifecycle event hooks → Widescreen adaptation: render and transition hooks
- Game wrapper layer → Randomizer: game abstraction
- Game wrapper layer → Tracker and map overlay: game abstraction
- Game wrapper layer → Widescreen adaptation: camera and state access
- Feature assets → Room fill extension: room metadata
- Feature assets → Tracker and map overlay: map and tracker data
- Supplied PSX media → Menu and runtime services: validated at runtime
- Build workflow → Project definition: builds
- Release workflow → Build workflow: publishes build output