Skip to content

Engine headers and desktop shell rebuilt from the 5960 binary - #96

Merged
MrMilenko merged 8 commits into
mainfrom
prov-headers
Nov 19, 2026
Merged

MrMilenko merged 8 commits into
mainfrom
prov-headers

Conversation

@MrMilenko

Copy link
Copy Markdown
Owner

The engine headers (node.h, runner.h, xap_compile.h, shape_render.h, camera.h, scene_groups.h, tmap_system.h, asset_loader.h, date_node.h, interpolator.h, settingsfile.h, desktop/config.h) are rewritten around the object layouts in the 5960 retail dashboard. Names, signatures, member order and virtual order are unchanged; CObject, CNode, CGroup, CInstance, CTimeDepNode, CNodeClass, CRunner and friends were checked against the binary's constructors, and the offsets are noted in node.h and runner.h.

Also rebuilt from the binary: the audio visualizer, the desktop app shell (dashapp.cpp), the desktop File and Folder nodes, and the desktop saved game grid's layout and selection. Leftover declarations in settings_nodes, screen, recovery_node, animation_nodes and camera were tidied. Write-ups in docs/decomp.

Checked old against new: after the header rewrite 96 of 99 desktop objects were byte identical and the other three differ only by a CHECK line number and a dropped debug assert; the visualizer matched over 72,000 frames (12.6M line calls); the app shell's draw calls matched over 2,000 frames (61,549 calls); 3,000 folder listings matched; the save grid matched over 12,000 frames (375,149 entries). Xbox retail and debug compile clean, desktop builds and runs clean.

Fix in its own commit: the visualizer read past its sample buffers (spinner on power of two widths, circle style on surfaces wider than 256).

Rewrote node.h, runner.h, xap_compile.h and the nine smaller headers fresh,
keeping names, signatures and member order. Checked CObject, CNode, CGroup,
CInstance, CTimeDepNode, CNodeClass and CRunner against the 5960 constructors
and noted the offsets in node.h and runner.h. Dropped the old ASSERT in
CNodeArray::SetNode. 96 of 99 desktop objects come out byte identical; the
other three differ only by that ASSERT and a CHECK line number.
Rewrote CAudioVisualizer's bodies from 5960 (0x63760..0x64630): the line,
spinner and analyzer styles, the bass flash and the wave overlay, keeping the
desktop mixer feed, the circle style and the clipping Theseus added. New
write-up in docs/decomp/AudioVisualizer.md. Old and new draw the same pixels
and lines on 72,000 test frames.
The spinner indexes frame t * count, and t lands on exactly 1.0 when the
width is a power of two, so it read one frame past the end. The circle style
indexes by column and walked off the 256 frame buffer on wider surfaces.
Both now hold the last frame.
Rewrote Alert, XboxInitRenderState, InitD3D, Draw, InitApp, CleanupApp,
Advance and GetStartupClassFile from 5960's main loop (0x2c520..0x2dbc0),
keeping the desktop device setup, lights, audio and shutdown. Dropped the
old ASSERTs. Startup states and 2,000 frames of Draw make the same calls
old and new.
Rewrote CFile and CFolder from 5960's Files.cpp code (0x317c0..0x32030) on
the desktop's char paths. Old and new list and sort 3,000 made up folders
the same way, and readText and the path property match.
Rewrote the class declarations and parameter names that still read like
the old code in settings_nodes, screen, recovery_node, animation_nodes and
camera. No behavior change: all five objects build byte identical.
Rewrote the desktop SavedGameGrid's Advance scroll, RenderIconRow,
RenderLoop, Render, OnSetProperty, SelectTitle, the select moves and
setSelImage from 5960's grid (0x47e50..0x49840), keeping the desktop title
scan, image paths and game icon rows. 12,000 harness frames of selection,
scrolling and drawing come out the same, transforms included.
@MrMilenko
MrMilenko merged commit e11fde8 into main Nov 19, 2026
5 checks passed
@MrMilenko
MrMilenko deleted the prov-headers branch November 19, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant