Record original inventory and recover all GAM level entities
This commit is contained in:
commit
d62e2ab4de
16 files changed
+3954
No files matched your search
@@ -0,0 +1,74 @@
|
||||
# Gameplay evidence
|
||||
|
||||
## Verified data reconstruction
|
||||
|
||||
`tools/levels/gam.py` parses all 35 supplied GAM files and accounts for every byte;
|
||||
re-encoding each parsed file reproduces its original bytes. Corpus: 3,299 entities,
|
||||
93 class FourCCs, 84,044 properties (22,505 string, 26,965 float, 31,275 integer,
|
||||
3,295 opaque type 2, four opaque type 4). Entity type names are inferred from
|
||||
matching object tags/properties, not universally proven class implementations.
|
||||
|
||||
All integer metadata and float32 values in GAM are **big endian** despite the
|
||||
little endian x86 executable. World positions are large unscaled coordinates;
|
||||
the Y coordinate is consistent with height, pending binary confirmation.
|
||||
|
||||
## Initial scene
|
||||
|
||||
`Original/NewGame.tsk` begins with `LV1B` and float32 20.0. This supports LV1B as
|
||||
the new-game scene; it does not prove all save fields. `gam/level1b.gam` has 129
|
||||
objects. Its player record at file offset `0x8`:
|
||||
|
||||
| Property | Value |
|
||||
|---|---|
|
||||
| kind | 3JIM |
|
||||
| ObjectTag | JIM1 |
|
||||
| PositionX | 5071.93310546875 |
|
||||
| PositionY | 26.661895751953125 |
|
||||
| PositionZ | 824.1039428710938 |
|
||||
| RotationY | 155 degrees |
|
||||
| StartPoint | STARTEXP |
|
||||
|
||||
The matching STRT record starts at `0x5b0e`. It agrees on player position/yaw;
|
||||
camera position is (4873.83642578125, 235.64761352539062, 373.21588134765625),
|
||||
camera rotations are zero, music is `musicsecretlab.omt` index 0, and StartTrigger
|
||||
is `LABEXP`. Camera look-at behavior and the introductory trigger require code
|
||||
analysis; do not treat zero stored rotation as proof of a zero effective rotation.
|
||||
|
||||
## Small validation scene
|
||||
|
||||
`gam/VR01.gam`: 16 entities, one trophy, four pickups, two phone booths and two
|
||||
LOAD return triggers. Player at `0x8`: (-2678.0380859375, 87.33218383789062,
|
||||
-2783.401123046875), yaw 290 degrees. STRT at `0x45c` stores camera
|
||||
(-2709.25634765625, 287.3321838378906, -2390.133056640625), music `musicvr01.omt`
|
||||
index 0 and start trigger `bu`. Pickups use radius 100.0 and PointValue 5.
|
||||
|
||||
## Controls documented by original readme
|
||||
|
||||
Source: `Original/readme.txt`, section V.
|
||||
|
||||
| Input | Original action |
|
||||
|---|---|
|
||||
| Up / Down | Forward / backup (rearview in scooter mode) |
|
||||
| Left / Right | Turn left / right |
|
||||
| Enter / Ctrl / left mouse | Primary fire |
|
||||
| Shift / Insert / right mouse | Jump or jet-pack burst |
|
||||
| M / O / H / I | Menu / objectives / help / item inventory |
|
||||
| G | Call Goddard |
|
||||
| Tab / Space | Gadget screen |
|
||||
| Escape | Quit / main menu / skip cutscene |
|
||||
| Mouse movement | Forward, backward, turn |
|
||||
|
||||
## Data is not an algorithm
|
||||
|
||||
LOAD exposes LevelName, StartPoint, RequiredTask, RequiredLevel, ExactLevel,
|
||||
Radius, SoundIndex, FadeType and FadeTime. PIC exposes prerequisite fields,
|
||||
PointValue and pickup index. These are faithfully recoverable inputs; exact
|
||||
trigger conditions, distance metric, timing, task comparison and state updates
|
||||
must be established from executable code or observation before implementation is
|
||||
called faithful. Negative integers commonly act as flags/sentinels; their exact
|
||||
meaning depends on each property.
|
||||
|
||||
Save data has a fixed-looking region followed by Pascal task names and big endian
|
||||
values (NewGame.tsk tail includes SCENE = 30). Save writing is not yet recovered.
|
||||
Physics, jumping, collision, AI, RNG, combat, progression and cutscene execution
|
||||
remain under investigation. No original gameplay session has been captured yet.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Architecture
|
||||
|
||||
Use a single .NET 10 C# executable, Silk.NET.Vulkan for Vulkan 1.3 rendering,
|
||||
SDL3 for platform windowing, input and audio. Linux x64 and Windows x64 are
|
||||
equally required. Source is `src/GamePort/`; root executable csproj allows
|
||||
`dotnet build` and `dotnet run` from GamePort. No runtime network dependencies.
|
||||
|
||||
Original assets stay in `../Original`. Python tools parse undocumented original
|
||||
formats into generated scene resources under `artifacts/`. The modern application
|
||||
loads these original-derived resources and big endian GAM entity data. Portable
|
||||
asset resolution must handle Windows-authored case differences. Extraction must
|
||||
retain material references, world coordinates, per-corner UVs and animation data;
|
||||
triangulation/render-state approximations require explicit documentation.
|
||||
|
||||
`Assets/GamLevel.cs` independently decodes original gameplay records and exposes
|
||||
player/startpoint/camera and other typed properties. Exact record bytes/unknown
|
||||
types remain accessible; do not normalize unknown flags into invented semantics.
|
||||
`tools/levels/gam.py` provides a lossless forensic reference and JSON export.
|
||||
|
||||
Renderer design follows original fixed-function needs, without PBR or invented
|
||||
visual effects. A headless offscreen rendering path makes actual Vulkan image
|
||||
verification possible without a desktop; this is distinct from SDL presentation.
|
||||
Simulation implementation must follow recovered algorithms and timing. A generic
|
||||
fly camera or rendered model alone does not satisfy the playable-scene requirement.
|
||||
|
||||
Subsystem implementation and validated ownership are documented in
|
||||
`infrastructure.md`, `analysis/graphics.md` and `rendering.md` as they become
|
||||
available. Persistent docs distinguish planned architecture from verified behavior.
|
||||
@@ -0,0 +1,21 @@
|
||||
# Compatibility and validation
|
||||
|
||||
Status is evidence-based; compilation alone is not runtime verification.
|
||||
|
||||
| Feature | Implemented | Tested | Evidence / limits |
|
||||
|---|---|---|---|
|
||||
| Original preservation | Hash baseline | Initial corpus | 539 files in original-manifest.json |
|
||||
| GAM reader/encoder Python | Yes | Linux, all 35 levels | Byte-for-byte round trip, six tests |
|
||||
| GAM C# loader | Yes | Pending compilation | Original scene/player/camera exposed |
|
||||
| OMT geometry recovery | In progress | Original level1 meshes | Asset agent integration pending |
|
||||
| .NET 10 Linux build | In progress | Pending | Project-local SDK installed |
|
||||
| Windows x64 build/package | Pending | Unverified | Cross-build will not prove execution |
|
||||
| Vulkan frame | In progress | Pending | Headless Mesa available; no initial display |
|
||||
| SDL3 window/input/audio | In progress | Pending | Native dependencies being built locally |
|
||||
| Playable scene / original fidelity | No | No | Rendering foundation does not establish gameplay |
|
||||
| Original execution/reference capture | No | No | Wine absent initially; originals not executed |
|
||||
| Animation/AI/combat/progression/save | No | No | Reverse engineering ongoing |
|
||||
|
||||
Current known limitations: no reconstructed complete gameplay loop yet; no native
|
||||
Windows testing or reference captures. Exact camera, physics, fixed-function
|
||||
lighting/blending/fog and task behavior need binary/observational validation.
|
||||
@@ -0,0 +1,19 @@
|
||||
# Decisions
|
||||
|
||||
1. **Preserve input directory.** Keep Original in place, baseline all file hashes,
|
||||
generate outputs elsewhere. No legacy binary execution in the source directory.
|
||||
2. **Nested local repository.** Workspace `.git` is reserved and not a functioning
|
||||
repository. Initialize GamePort/.git, no remotes, commit code/docs/tools only.
|
||||
3. **Evidence-first data recovery.** Native x86 executable does not imply little
|
||||
endian formats: GAM and OMT use big endian metadata. Require bounded readers,
|
||||
full consumption and real original-file regressions.
|
||||
4. **Initial scene.** NewGame.tsk starts LV1B and player GAM references STARTEXP.
|
||||
Prioritize that scene; use smaller VR01 for data/render verification. The LV1B
|
||||
LABEXP start trigger means simple camera spawning is insufficient for fidelity.
|
||||
5. **Local dependencies.** Missing SDK/native tools installed under `.tools` or
|
||||
`/tmp` after approved official downloads, without assuming root or altering host.
|
||||
6. **Useful parallelism.** Three independent agents own binary/rendering, asset
|
||||
recovery and infrastructure, while primary owns gameplay data and integration.
|
||||
Shared runtime/format changes must be coordinated. No external coordination.
|
||||
7. **Honest compatibility.** Build, headless Vulkan frame, SDL presentation,
|
||||
gameplay fidelity and native Windows execution are separate evidence categories.
|
||||
@@ -0,0 +1,29 @@
|
||||
# GAM level entities
|
||||
|
||||
Derived from all 35 original files. Implemented reader and lossless encoder:
|
||||
`tools/levels/gam.py`; corpus regression tests: `tests/test_levels.py`.
|
||||
|
||||
All multibyte integers/floats below use big endian byte order.
|
||||
|
||||
```
|
||||
file: char[4] level_code, u32 entity_count, entity[entity_count]
|
||||
entity: char[4] class_code, u32 property_count, property[property_count], byte[4] trailer
|
||||
property: u8 name_length, char[name_length] name, u32 type, u32 payload_length,
|
||||
[u8 string_length if type == 1], byte[payload_length] payload
|
||||
```
|
||||
|
||||
The trailer is opaque: its purpose is unverified. The string prefix must equal
|
||||
payload_length but is excluded from payload_length. Type 1 is Latin-1-compatible
|
||||
text (no terminator); type 3 is float32; type 6 is signed int32. Type 2 has four
|
||||
opaque bytes in this corpus (RotateToDest) and type 4 remains opaque. Retain raw
|
||||
payload bytes and property order to preserve float bit patterns and unknown types.
|
||||
No compression or padding occurs between the fields. There is no file footer.
|
||||
|
||||
Reader rejects truncation, impossible counts, duplicate properties, scalar length
|
||||
mismatches, string length mismatches, non-finite known scalars and trailing bytes.
|
||||
Original corpus passes these constraints; they are not proof of every conceivable
|
||||
GAM version. Never read a Windows binary using host-endian assumptions.
|
||||
|
||||
Examples: `VR01.gam` has header `56 52 30 31 00 00 00 10`; its first object at 8
|
||||
is `3JIM` with 19 properties. `level1b.gam` starts `LV1B`, 129 objects, with the
|
||||
first `3JIM` at 8. All 3,299 object trailers are retained without reinterpretation.
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,25 @@
|
||||
# Progress
|
||||
|
||||
## Verified so far
|
||||
- Read complete primary specification, inspected originals, established ownership.
|
||||
- Created local-only Git repository under GamePort and persistent project guidance.
|
||||
- Recorded all 539 original-file SHA-256 hashes (224,601,234 bytes).
|
||||
- Identified PE32 x86 MSVC C++ game and Open Media Toolkit 2.0 DR4 engine.
|
||||
- Fully decoded 35 GAM levels, 3,299 entities, 93 class codes, 84,044 properties.
|
||||
- Python GAM reader/encoder round-trips every original byte; six targeted tests pass.
|
||||
- C# GAM reader added with explicit endian handling and original startpoint/camera.
|
||||
- OMT resource index and meshes recovered by asset investigation; integration ongoing.
|
||||
- Scoped dependency download approved; local .NET 10 SDK/Silk/SDL setup ongoing.
|
||||
|
||||
## Current work
|
||||
Binary/rendering investigation, exact material/texture/audio recovery, C# runtime,
|
||||
Vulkan offscreen verification, SDL3 presentation, cross-platform packaging.
|
||||
No claim of full playable reconstruction, original behavior comparison, or Windows
|
||||
runtime validation. See `tasks.md` and `compatibility.md` for remaining work.
|
||||
|
||||
## Continuation
|
||||
Read AGENTS, this file, tasks, architecture and analysis reports. Check local Git
|
||||
status and active agents before editing. Avoid repeating completed inventory/GAM
|
||||
analysis. Original initial-scene evidence points to LV1B / STARTEXP, with VR01 as
|
||||
a smaller resource-validation scene. Exact movement defaults now recovered in
|
||||
binary investigation; do not substitute unverified gameplay guesses.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Initial reconnaissance
|
||||
|
||||
Original game identified from supplied readme: **Jimmy Neutron: Boy Genius**.
|
||||
Root input directory is `../Original/`, preserved in place. The specification
|
||||
is `../prompt.MD` (uppercase extension on disk), read in full before work.
|
||||
|
||||
539 input files, 224,601,234 bytes. Complete per-file sizes, first bytes and
|
||||
SHA-256 hashes: `original-manifest.json`. Reproduce or verify via
|
||||
`tools/recon/inventory.py`. There are 254 ASE, 128 PNG, 100 OMT, 35 GAM,
|
||||
12 TSK, five EXE, three DLL, one readme TXT and one uninstall ISU.
|
||||
|
||||
## Binaries and API evidence
|
||||
|
||||
`file` identifies Neutron.exe and OMT2.dll as PE32 x86 Windows GUI files, each
|
||||
with four sections. Binary analysis identifies MSVC C++ and Open Media Toolkit
|
||||
2.0 DR4. Imported DirectDrawCreateEx, DirectInput8 and DirectSound plus engine
|
||||
renderer symbols establish legacy graphics/audio/input infrastructure. The
|
||||
readme's requirement for DirectX 8 does not alone establish Direct3D version.
|
||||
See `analysis/binary.md` and `analysis/graphics.md` for addresses and confidence.
|
||||
|
||||
## Asset evidence
|
||||
|
||||
ASE files are readable 3ds Max ASCII export version 200, including frame
|
||||
animation. `ASE/jimrun.ASE` names jimmyrun.max and stores 0..4 frames at 10 fps,
|
||||
480 ticks/frame, with position, normals and UV data. PNG files are unmodified
|
||||
original textures. Proprietary OMT databases begin `0MF2` and have a big endian
|
||||
index offset; the asset investigation has recovered the resource table and
|
||||
original world-space meshes. GAM entities are fully decoded and byte-round-trip
|
||||
verified across all 35 files. TSK saves remain partially understood.
|
||||
|
||||
Details: `analysis/assets.md`, `file-formats.md`, `gam-format.md`,
|
||||
`analysis/gameplay.md`. Generated outputs belong under ignored `artifacts/`.
|
||||
|
||||
## Initial environment
|
||||
|
||||
Available initially: git, Python 3.12, file, objdump, strings, gcc, cmake,
|
||||
curl/wget, Vulkan loader and Mesa ICDs including lavapipe. No dotnet in PATH;
|
||||
no Wine, Ghidra/Rizin/radare2, glslang, spirv tools, SDL3 or Xvfb in PATH.
|
||||
No DISPLAY or WAYLAND_DISPLAY was set. No original binary has been executed.
|
||||
|
||||
Native isolated-context subagents, parallel tool orchestration and background
|
||||
commands are supported. Three meaningful independent tasks were delegated
|
||||
(binary/rendering, assets, infrastructure); primary owns gameplay/integration.
|
||||
Git workspace metadata is reserved read-only, so a separate local repository
|
||||
was initialized under GamePort, without remotes. Local worktrees are possible
|
||||
but exclusive directory ownership is sufficient for these initial tasks.
|
||||
|
||||
Dependency downloads initially fail sandbox DNS. Scoped escalation for official
|
||||
SDK/library downloads succeeded; dependencies are installed project-locally.
|
||||
See infrastructure and compatibility reports for final actual versions/checks.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Reverse-engineering index
|
||||
|
||||
Authoritative reference is supplied originals. Findings must be supported by file
|
||||
offsets, virtual addresses, API symbols or observed behavior. Decompiled output is
|
||||
evidence, not original source. Runtime behavior has not yet been observed.
|
||||
|
||||
- `original-manifest.json`: complete original SHA-256 baseline.
|
||||
- `reconnaissance.md`: input/tool inventory, game identity and initial environment.
|
||||
- `analysis/binary.md`: PE/compiler, entry points, imports and function mappings.
|
||||
- `analysis/graphics.md`: renderer/API, geometry, camera and Vulkan equivalents.
|
||||
- `analysis/assets.md`, `file-formats.md`: recovered OMT/ASE/texture/audio evidence.
|
||||
- `gam-format.md`: fully accounted GAM wire format and exact round-trip validation.
|
||||
- `analysis/gameplay.md`: original controls, startpoint/camera, entities and limits.
|
||||
|
||||
## Function map under investigation
|
||||
|
||||
Provisional mappings from binary agent (disassembly must accompany final report):
|
||||
C3DJimmy update 0x424600, input 0x426030; player input 0x438A60, walking branch
|
||||
0x438BC0. Player defaults ctor region 0x4372A0 sets acceleration 30, deceleration
|
||||
35, maximum speed 600; increments occur per simulation invocation, while movement
|
||||
uses elapsed time. A future simulation must recover update cadence before calling
|
||||
these coefficients timestep-independent. Jump/gravity values remain provisional.
|
||||
|
||||
## Unresolved
|
||||
|
||||
Original execution under isolated Wine/Windows; complete gameplay algorithms;
|
||||
archive animations and render states; save schema; exact historical timing and
|
||||
Windows runtime compatibility. Follow `tasks.md` for concrete next actions.
|
||||
@@ -0,0 +1,30 @@
|
||||
# Tasks
|
||||
|
||||
## Completed
|
||||
- [x] Full specification read; original inventory, hashes and local Git established.
|
||||
- [x] Capabilities/tool reconnaissance; independent investigators with file ownership.
|
||||
- [x] Executable format and engine identification.
|
||||
- [x] Decode/round-trip all 35 GAM files; reader corruption and original-data tests.
|
||||
- [x] Implement C# GAM asset reader (compilation/runtime checks pending).
|
||||
|
||||
## Active
|
||||
- [ ] Complete binary/graphics report with addresses, rendering state and camera.
|
||||
- [ ] Recover player timing, movement, gravity, collision and input algorithms.
|
||||
- [ ] Extract OMT meshes, textures, materials, animations, sound and music robustly.
|
||||
- [ ] Verify asset schema and integration into native Vulkan renderer.
|
||||
- [ ] Compile .NET 10 runtime and verify real offscreen rendering/readback.
|
||||
- [ ] Integrate SDL3 window/input/audio; exercise local display where possible.
|
||||
- [ ] Local Linux and Windows self-contained builds and dependency packaging.
|
||||
- [ ] Test original preservation after tools; checkpoint stable work locally.
|
||||
|
||||
## Required after foundation
|
||||
- [ ] Run original in isolated copied-data Wine prefix or local Windows VM.
|
||||
- [ ] Capture original startup, controls, camera, animation, audio and gameplay.
|
||||
- [ ] Reconstruct LV1B opening sequence and one complete playable scene.
|
||||
- [ ] Implement/verify collision, interactions, trigger/task system and progression.
|
||||
- [ ] Implement original animation playback and correct rendering states.
|
||||
- [ ] Implement menus, inventory, gadgets, combat/AI and all remaining scenes.
|
||||
- [ ] Recover save/load behavior, configuration, audio mixing and transitions.
|
||||
- [ ] Compare reconstruction to original references; resolve fidelity differences.
|
||||
- [ ] Run native Windows tests; distinguish cross-publishing from runtime evidence.
|
||||
- [ ] Produce verified local release packages and accurate known limitations.
|
||||
Reference in new issue
Block a user