docs: factual rewrite of README, GitHub Pages, and CONTRIBUTING; remove Ghidra references#57
Conversation
…, no hype Agent-Logs-Url: https://github.com/OpenRakis/Cryogenic/sessions/be596f46-8b1d-4a05-a979-74e098040fd2 Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
…re docs, no Ghidra Agent-Logs-Url: https://github.com/OpenRakis/Cryogenic/sessions/be596f46-8b1d-4a05-a979-74e098040fd2 Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
… from codebase Agent-Logs-Url: https://github.com/OpenRakis/Cryogenic/sessions/be596f46-8b1d-4a05-a979-74e098040fd2 Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
…river documentation Agent-Logs-Url: https://github.com/OpenRakis/Cryogenic/sessions/be596f46-8b1d-4a05-a979-74e098040fd2 Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Documentation-focused PR that rewrites user-facing docs to be factual/low-hype, adds more concrete architecture details (segments, driver remapping, file structure), and removes Ghidra references from the repository’s docs/comments.
Changes:
- Rewrites
README.md,docs/index.html, andCONTRIBUTING.mdto describe Cryogenic’s hybrid override model, segment layout, driver remapping, and code structure. - Removes/renames Ghidra references in comments and documentation (e.g., “in disassembly” wording).
- Trims/updates various docs sections (badges, contributing workflow, .NET 10 references).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Reworked project description and added detailed segment/driver remapping + code-structure documentation. |
docs/index.html |
Replaced “goals/marketing” content with factual “code structure / execution flow” documentation for GitHub Pages. |
CONTRIBUTING.md |
Simplified contribution guide and added segment/driver remapping + workflow notes. |
src/Cryogenic/DriverLoadToolbox.cs |
Removes Ghidra issue URL from XML doc remark. |
src/Cryogenic/Overrides/VgaDriverCode.cs |
Replaces “in ghidra” phrasing with “in disassembly” in comments. |
| | `cs1` | `0x1000` | Main game code (`DNCDPRG.EXE` loaded here) | ~80 functions across most override files | | ||
| | `cs2` | `0xD000` | DNVGA — VGA graphics driver | 32 functions in `VgaDriverCode.cs`, 1 in `StaticDefinitions.cs` | | ||
| | `cs3` | `0xE000` | DNPCS2 / DNSBP — PCM audio driver | None (declared but unused in current overrides) | | ||
| | `cs4` | `0xE000` | Reserved for MIDI driver memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | |
There was a problem hiding this comment.
The README describes cs4 as "Reserved for MIDI driver memory-dump hooks", but MIDI/music drivers are remapped to 0xF000 (DriverLoadToolbox.DRIVER3_SEGMENT) while cs4 is set to 0xE000 in Overrides.cs. This row should avoid implying cs4 is the MIDI segment; consider describing it as the 0xE000 segment used for the inline memory-dump hooks (or for self-modifying-code dump hooks), without calling it MIDI-specific.
| | `cs4` | `0xE000` | Reserved for MIDI driver memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | | |
| | `cs4` | `0xE000` | Reserved `0xE000` segment for inline memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | |
| ├── DriverLoadToolbox.cs Remaps driver segments to 0xD000/0xE000/0xF000 | ||
| ├── Overrides/ | ||
| │ ├── Overrides.cs Defines segment fields (cs1–cs5), registers all overrides | ||
| │ ├── VgaDriverCode.cs 23 VGA functions: mode setting, blitting, palette, mouse cursor |
There was a problem hiding this comment.
The file tree claims VgaDriverCode.cs contains "23 VGA functions", but DefineVgaDriverCodeOverrides() registers 32 driver functions (and only a subset have C# implementations). Please update this count (and/or clarify the distinction between functions registered for tracing vs functions actually overridden).
| │ ├── VgaDriverCode.cs 23 VGA functions: mode setting, blitting, palette, mouse cursor | |
| │ ├── VgaDriverCode.cs VGA driver overrides/helpers; only a subset of the 32 registered VGA driver entry points are implemented here (mode setting, blitting, palette, mouse cursor) |
| ├── Overrides/ | ||
| │ ├── Overrides.cs Defines segment fields (cs1–cs5), registers all overrides | ||
| │ ├── VgaDriverCode.cs 23 VGA functions: mode setting, blitting, palette, mouse cursor | ||
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides |
There was a problem hiding this comment.
MenuCode.cs is described as having "14 menu-type constants", but Overrides/MenuCode.cs declares 16 MENU_TYPE_* constants. Update the count (and optionally note that MENU_TYPE_ORNI_MAP shares a value with MENU_TYPE_MOVE_TROOP).
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides | |
| │ ├── MenuCode.cs 16 menu-type constants (including `MENU_TYPE_ORNI_MAP`, which shares a value with `MENU_TYPE_MOVE_TROOP`), 2 menu state overrides |
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides | ||
| │ ├── DialoguesCode.cs 3 dialogue functions: counter, init, hex-digit conversion | ||
| │ ├── MapCode.cs 5 map/cursor functions and click-handler address constants | ||
| │ ├── DisplayCode.cs 11 framebuffer and font selection functions |
There was a problem hiding this comment.
DisplayCode.cs is described as having "11 framebuffer and font selection functions", but DefineDisplayCodeOverrides() currently registers 12 functions (excluding the commented-out one). Please update the count to match what is actually registered.
| │ ├── DisplayCode.cs 11 framebuffer and font selection functions | |
| │ ├── DisplayCode.cs 12 framebuffer and font selection functions |
| │ ├── DatastructuresCode.cs 2 memory structure functions (index-to-pointer, sprite lookup) | ||
| │ ├── InitCode.cs 1 VGA state initialization function | ||
| │ ├── MT32DriverCode.cs 3 Roland MT-32 MIDI driver functions at segment 0xF000 | ||
| │ ├── UnknownCode.cs 20 partially understood functions (bit ops, memcpy, state flags) |
There was a problem hiding this comment.
UnknownCode.cs is described as having "20 partially understood functions", but DefineUnknownCodeOverrides() registers 21 functions (including two that are defined by name only). Please update the count or clarify what is being counted.
| │ ├── UnknownCode.cs 20 partially understood functions (bit ops, memcpy, state flags) | |
| │ ├── UnknownCode.cs 21 registered functions (including 2 name-only definitions; bit ops, memcpy, state flags) |
| ├── Overrides/ | ||
| │ ├── Overrides.cs Defines segment fields (cs1–cs5), registers all overrides | ||
| │ ├── VgaDriverCode.cs 23 VGA functions (mode, blit, palette, cursor, retrace) | ||
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides |
There was a problem hiding this comment.
The tree says MenuCode.cs has 14 menu-type constants, but Overrides/MenuCode.cs declares 16 MENU_TYPE_* constants. Update the count so it matches the code.
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides | |
| │ ├── MenuCode.cs 16 menu-type constants, 2 menu state overrides |
| │ ├── MenuCode.cs 14 menu-type constants, 2 menu state overrides | ||
| │ ├── DialoguesCode.cs 3 dialogue system functions | ||
| │ ├── MapCode.cs 5 map/cursor functions and click-handler constants | ||
| │ ├── DisplayCode.cs 11 framebuffer and font selection functions |
There was a problem hiding this comment.
The tree says DisplayCode.cs has 11 functions, but DefineDisplayCodeOverrides() registers 12 functions (excluding the commented-out registration). Please correct the count.
| │ ├── DisplayCode.cs 11 framebuffer and font selection functions | |
| │ ├── DisplayCode.cs 12 framebuffer and font selection functions |
| │ ├── DatastructuresCode.cs 2 memory structure functions | ||
| │ ├── InitCode.cs 1 VGA state initialization function | ||
| │ ├── MT32DriverCode.cs 3 Roland MT-32 MIDI functions at segment 0xF000 | ||
| │ ├── UnknownCode.cs 20 partially understood functions |
There was a problem hiding this comment.
The tree says UnknownCode.cs has 20 functions, but DefineUnknownCodeOverrides() registers 21 functions. Please update the number or clarify what is being counted.
| │ ├── UnknownCode.cs 20 partially understood functions | |
| │ ├── UnknownCode.cs 21 partially understood functions |
| | `cs1` | `0x1000` | Main game code (`DNCDPRG.EXE` loaded here) | ~80 functions across most override files | | ||
| | `cs2` | `0xD000` | DNVGA — VGA graphics driver | 32 functions in `VgaDriverCode.cs`, 1 in `StaticDefinitions.cs` | | ||
| | `cs3` | `0xE000` | DNPCS2 / DNSBP — PCM audio driver | None (declared but unused in current overrides) | | ||
| | `cs4` | `0xE000` | Reserved for MIDI driver memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | |
There was a problem hiding this comment.
This table describes cs4 (0xE000) as "MIDI driver memory-dump hooks", but the MIDI/music drivers are remapped to 0xF000 (DriverLoadToolbox.DRIVER3_SEGMENT). Please avoid describing cs4 as the MIDI segment and instead describe it as the segment used for the inline dump hooks (or similar).
| | `cs4` | `0xE000` | Reserved for MIDI driver memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | | |
| | `cs4` | `0xE000` | Reserved for inline memory-dump hooks | 2 inline hooks for memory dumps at offsets 0x02DC and 0x03EE | |
| // Correct | ||
| globalsOnDs.Set(0x47A8, value); | ||
|
|
||
| 1. **Keep generated naming** - Override methods use pattern `{Segment}_{Offset}_{Linear}` (e.g., `SetBackBufferAsActiveFrameBuffer_1000_C085_01C085`) | ||
| // Incorrect — bypasses synchronization | ||
| memory.UInt16[state.DS, 0x47A8] = value; | ||
| ``` |
There was a problem hiding this comment.
The example uses globalsOnDs.Set(0x47A8, value), but ExtraGlobalsOnDs/GlobalsOnDs don't have a generic Set(offset, value) API. Please update the example to use the generated, typed accessor for that address (e.g. the Set1138_47A8_* method) so contributors can copy/paste a working pattern.
Description of Changes
Rewrites all user-facing documentation to use factual, zero-hype language. Documents actual code segments with per-field override counts and per-driver remapping details. Removes all Ghidra references from the entire codebase.
Files changed:
README.md — Factual description of what Cryogenic does and how. Detailed segment table showing what each
cs1–cs5field contains and how many overrides are registered against it. Driver remapping table listing all 5 remapped drivers with their target addresses and purposes. Full code structure tree with per-file descriptions (function counts, addresses, domains). Removed emojis, marketing language, social badges (stars/forks/issues).docs/index.html — Replaced all section text with factual descriptions. Replaced "Project Goals" section with "Code Structure" section containing the segment table, driver remapping table, per-file override documentation, and supporting code descriptions. Removed Ghidra Integration feature card. Simplified contributing section.
CONTRIBUTING.md — Factual setup and workflow instructions. Updated .NET version reference from 8 to 10. Added the same detailed segment and driver remapping tables. Removed Ghidra tool recommendation and Ghidra plugin note. Streamlined by removing redundant sections (Code of Conduct, Communication, Questions).
src/Cryogenic/DriverLoadToolbox.cs — Removed Ghidra issue URL from XML doc comment.
src/Cryogenic/Overrides/VgaDriverCode.cs — Replaced 7 occurrences of "in ghidra" with "in disassembly" in inline comments.
Rationale behind Changes
The existing documentation used hype language ("deep dive", "power of hybrid emulation", "preserve gaming history") and generic descriptions ("CS2/3/4 for drivers"). This rewrite makes every claim specific and verifiable: segment fields list their actual values, override counts, and which drivers map where. Ghidra references are removed per project direction (the Ghidra plugin is abandoned; CFGCPU is the recommended analysis tool).
Suggested Testing Steps
dotnet buildpasses (confirmed — build succeeds with 0 errors, 0 warnings)