Add Crusader-specific USECODE data and documentation

- Introduced new file `vm_mask_ladder.tsv` containing detailed mappings for Crusader USECODE VM masks and their associated descriptors.
- Added comprehensive documentation in `scummvm-crusader-reference.md` outlining the structure, findings, and implications for reverse-engineering the Crusader engine within ScummVM.
- Created `usecode-roundtrip-ir.md` to document the plan for converting Crusader USECODE bytes into a human-readable format, detailing the container layout, event names, and intrinsic tables.
- Implemented a PowerShell script `temp_usecode_sample.ps1` for extracting and analyzing USECODE data from the Crusader FLX files, providing insights into class and event structures.
This commit is contained in:
MaddoScientisto 2026-03-22 17:26:39 +01:00
commit de42fd1ea1
42 changed files with 21970 additions and 1522 deletions

View file

@ -0,0 +1,14 @@
wrapper_address mask_pair caller_anchor descriptor_bias
0005:27a4 0x0001:0000 000c:a09e entity +0x5b bit 0x0004 branch generic active-event-biased lane; no direct class-id bridge
0005:2867 0x0002:0001 stores result into entity field +0x39 active-event ecosystem bias stronger than referent-anchor bias
0005:2ae2 0x0004:0002 same verified local mask ladder around entity_vm_context_try_create_masked_for_entity active-event ecosystem bias stronger than referent-anchor bias
0005:2c9b 0x0010:0004 direct callers at 0005:5946 and 0005:59e9 active-event ecosystem bias stronger than referent-anchor bias
0005:2918 0x0020:0005 +0x3c == 0x20b object lane, carries caller fields +0x36/+0x38 candidate active-event field bridge; still not descriptor-specific
0005:2c06 0x0200:0009 direct caller anchor at 0005:0292 active-event ecosystem bias stronger than referent-anchor bias
0005:2c35 0x0400:000a xref-dark signed slot-offset wrapper forwarding context +0x34 offset-specialized masked context creation; descriptor family unresolved
0005:2c68 0x0800:000b xref-dark signed slot-offset wrapper forwarding context +0x34 offset-specialized masked context creation; descriptor family unresolved
0005:2cd2 0x1000:000c direct caller anchor at 0005:0fee active-event ecosystem bias stronger than referent-anchor bias
0004:f05c 0x2000:0015 0004:f2b3 overlap/proximity branch with entity byte +0x32 state checks gameplay-state lane feeding runtime materialization, not direct descriptor switch
0005:2d01 0x4000:000e direct callers at 0007:814e and 0007:822e active-event ecosystem bias stronger than referent-anchor bias
0004:f033 0x8000:0007 local wrapper seed recovered from direct instruction evidence gameplay-side materialization lane; still descriptor-agnostic
0005:2d30 0x8000:000f entity id/class flag gate plus 0x0f16 / 0x20f dispatch-entry emission path strongest current active-event ecosystem candidate in the ladder
1 wrapper_address mask_pair caller_anchor descriptor_bias
2 0005:27a4 0x0001:0000 000c:a09e entity +0x5b bit 0x0004 branch generic active-event-biased lane; no direct class-id bridge
3 0005:2867 0x0002:0001 stores result into entity field +0x39 active-event ecosystem bias stronger than referent-anchor bias
4 0005:2ae2 0x0004:0002 same verified local mask ladder around entity_vm_context_try_create_masked_for_entity active-event ecosystem bias stronger than referent-anchor bias
5 0005:2c9b 0x0010:0004 direct callers at 0005:5946 and 0005:59e9 active-event ecosystem bias stronger than referent-anchor bias
6 0005:2918 0x0020:0005 +0x3c == 0x20b object lane, carries caller fields +0x36/+0x38 candidate active-event field bridge; still not descriptor-specific
7 0005:2c06 0x0200:0009 direct caller anchor at 0005:0292 active-event ecosystem bias stronger than referent-anchor bias
8 0005:2c35 0x0400:000a xref-dark signed slot-offset wrapper forwarding context +0x34 offset-specialized masked context creation; descriptor family unresolved
9 0005:2c68 0x0800:000b xref-dark signed slot-offset wrapper forwarding context +0x34 offset-specialized masked context creation; descriptor family unresolved
10 0005:2cd2 0x1000:000c direct caller anchor at 0005:0fee active-event ecosystem bias stronger than referent-anchor bias
11 0004:f05c 0x2000:0015 0004:f2b3 overlap/proximity branch with entity byte +0x32 state checks gameplay-state lane feeding runtime materialization, not direct descriptor switch
12 0005:2d01 0x4000:000e direct callers at 0007:814e and 0007:822e active-event ecosystem bias stronger than referent-anchor bias
13 0004:f033 0x8000:0007 local wrapper seed recovered from direct instruction evidence gameplay-side materialization lane; still descriptor-agnostic
14 0005:2d30 0x8000:000f entity id/class flag gate plus 0x0f16 / 0x20f dispatch-entry emission path strongest current active-event ecosystem candidate in the ladder