Commit graph

40 commits

Author SHA1 Message Date
f528404761 Translucency doc 2026-03-30 14:07:00 +02:00
c4fa8a6b05 Decomp updates 2026-03-30 00:19:01 +02:00
f6a5155675 Removed items doc 2026-03-29 13:47:42 +02:00
c34f481c3a Documentation improvements 2026-03-29 01:14:09 +01:00
d78808d6b5 Moved map renderer to its own repo 2026-03-28 08:54:44 +01:00
Marco
90954fbf37 feat: enhance map renderer with catalog synchronization and reload functionality
- Added a "Reload Current Map" button to the left panel for refreshing the selected map after catalog edits.
- Updated catalog CSV handling to support non-authoritative `categorization` and `qualities` columns.
- Implemented automatic addition of newly observed shapes to the game catalog CSV during cache builds.
- Modified catalog entry handling to ensure proper boolean overrides for `roof` and `semitransparency`.
- Introduced `ensureShapeCatalogCoverage` function to maintain catalog integrity based on observed shapes.
- Enhanced the serialization of catalog entries to include new fields and proper formatting.
- Updated UI to reflect changes in reload state and button functionality.
2026-03-27 17:27:51 +01:00
Marco
f93cfc31c8 Refactor map renderer and server API
- Updated index.html to enhance UI with new elements for hidden shapes and catalog CSVs.
- Changed download button to a button element for better accessibility.
- Modified server.js to improve API endpoints:
  - Renamed overlays endpoint to scene for clarity.
  - Updated tile rendering endpoints to use atlas instead of tile coordinates.
  - Added new endpoint for downloading shape catalog CSV files.
  - Removed unused options in build creation.
2026-03-27 16:28:45 +01:00
Marco
ab5e514e61 Implement inspect mode for shape metadata and enhance overlay interactions 2026-03-27 13:30:49 +01:00
Marco
06e67d8341 Implement overlay sprite rendering and update API endpoints for overlays 2026-03-27 13:12:45 +01:00
Marco
d8940a1b1d Add overlay support with interactive tooltips and metadata display 2026-03-27 12:01:21 +01:00
Marco
549ff38334 Enhance map rendering with WebP support and loading feedback
- Update tile rendering to support both PNG and WebP formats.
- Introduce a loading spinner and progress bar for build feedback.
- Remove the manual build button; builds now trigger automatically on map selection.
- Add a phase plan document outlining future improvements and goals.
2026-03-27 11:02:30 +01:00
Marco
24a4d90a3e Added node based web map renderer 2026-03-27 10:04:44 +01:00
82ae89865a Add new modules for Crusader map rendering and processing
- Implemented `formats.py` to define data structures and functions for handling map data, including reading and decoding shape and map items.
- Created `png.py` for generating PNG images from shape frames and pixel data.
- Developed `sorting.py` to manage the sorting and rendering order of map items based on their properties and spatial relationships.
- Introduced `render_all_maps.py` to facilitate the rendering of all maps for specified games, including command-line argument parsing and subprocess management for rendering tasks.
2026-03-27 08:22:09 +01:00
af5b77ea13 Map sorting and usecode 2026-03-26 23:12:38 +01:00
589bfc31ef Pseudocode decompialtion improvements and docs 2026-03-26 22:10:48 +01:00
f869a181a3 renamed ghidra mcp wishlist to avoid gitignore 2026-03-26 17:35:07 +01:00
ecfe25087a Add new files and update project state for Spanish localization analysis
- Introduced new binary files for user data and database.
- Updated project state to include new paths for Spanish executable.
- Added detailed notes on Spanish cheat/debug differences in a new document.
- Revised mid-project plan to reflect findings from localized build comparison.
2026-03-26 14:11:34 +01:00
c12bb39437 Usecode pseudocode 2026-03-26 00:37:17 +01:00
f92d1504fa Stuff 2026-03-25 23:32:36 +01:00
ee33f94b4b Pseudocode and stuff 2026-03-25 23:32:13 +01:00
Marco
7310c4fe96 Add detailed log for retail debugger patch attempts in CRUSADER.EXE
This commit introduces a comprehensive document outlining the various executable-patching attempts aimed at revealing the hidden retail usecode debugger within the CRUSADER.EXE file. The document serves multiple purposes, including preserving negative evidence, recording patch shapes and their rationales, and ensuring that runtime outcomes are linked to specific patch generations.

Key sections include:
- Ground rules for patching and validation processes.
- A table of stable facts regarding the debugger's structure and behavior.
- A detailed attempt log documenting each patch's shape, mechanical and runtime results, and verdicts.
- Root-cause findings from failed paths, providing insights into the challenges faced during the patching process.
- Current live candidates for further testing and exploration.

This documentation is intended to streamline future patching efforts and improve the understanding of the underlying mechanics of the debugger.
2026-03-25 17:36:16 +01:00
ded6db3adc Updated gitignore 2026-03-25 08:15:33 +01:00
ad6ebd0b86 Add PyGhidra Crusader Toolkit and patch scripts
- Introduced README.md for the PyGhidra Crusader Toolkit, detailing setup and usage instructions.
- Added bootstrap_env.ps1 script to create and refresh the Python virtual environment with necessary packages.
- Implemented _tmp_patch_hidden_cheat_menu.py and _tmp_patch_hidden_cheat_menu_deferred.py scripts for patching specific memory addresses in Ghidra.
2026-03-25 08:15:21 +01:00
fafd849beb Crusader-disasm export + some things 2026-03-24 19:23:09 +01:00
daa363c3d2 Add 'annotate-usecode' command to import USECODE IR JSON annotations
- Introduced a new command 'annotate-usecode' to import USECODE IR JSON annotation hints as Ghidra comments on compiled anchors.
- Added argument parsing for multiple IR JSON files, comment type selection, and a dry-run option.
- Implemented logic to read annotation records from the provided IR files and set comments on the corresponding addresses in Ghidra.
- Enhanced JSON schema to include response structure for the new command.
2026-03-24 18:14:20 +01:00
4d3c8cd81b Add detailed class event processing and family comparison tools
- Enhance `extract_eusecode_flx.py` to derive class event rows with additional metadata including derived body windows and repeated template statuses.
- Introduce `usecode_family_compare.py` for comparing event families, analyzing commonalities in event bodies, and generating reports on identical groups and differences.
- Implement new data structures for managing class event rows and family artifact specifications.
- Update output formats to include derived body information and repeated family regression checks.
- Ensure robust validation of repeated family expectations against actual extracted data.
2026-03-22 23:24:46 +01:00
de42fd1ea1 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.
2026-03-22 17:26:39 +01:00
3daffbf113 Add extractor for Crusader's EUSECODE.FLX container
- Implemented a Python script to extract data from the EUSECODE.FLX file format.
- Defined data structures for candidate entries and extracted chunks using dataclasses.
- Added functions to read and parse the FLX table, extract candidate data, and generate human-readable output files.
- Included functionality for analyzing extracted data, including generating summaries, descriptors, and event family reports.
- Implemented utilities for calculating printable ratios, zero ratios, and identifying text-like data.
- Added support for writing various output formats, including JSON, TSV, and Markdown.
2026-03-22 14:27:38 +01:00
3d4c4933ec Refactor Ghidra instructions, add new binary files, and enhance decompilation notes
- Updated Ghidra instructions to emphasize keeping analysis batches small.
- Added new binary files: `db.104.gbf`, `db.105.gbf`, and `db.27.gbf`.
- Expanded decompilation notes for `cheat_code_check`, detailing its internal workings and verified cheat actions.
- Revised segment coverage ledger to reflect new findings and promote segments from `Foothold` to `Partial`.
- Enhanced `plan-mid.md` with updated estimates and focus areas for ongoing analysis.
2026-03-21 21:43:33 +01:00
d1222a2a4f Enhance segment coverage ledger and mid-project plan with detailed updates
- Added new binary files for segment coverage in `Crusader.rep/idata/00/~00000006.db/`
- Updated `crusader_segment_coverage_ledger.csv` to reflect new findings and classifications, including:
  - Renamed segments for clarity on allocator mechanics and dispatch entry roles.
  - Adjusted coverage status for segments related to startup/display orchestration and allocator phase finalization.
- Revised `plan-mid.md` to include recent progress on segment recovery and classification, emphasizing the ongoing work on the `0x4588` callback object and related functions.
2026-03-21 20:32:21 +01:00
8847708d41 Add Ghidra MCP server update workflow instructions and various binary files; enhance segment coverage ledger and mid-project plan with detailed analysis notes 2026-03-21 19:29:57 +01:00
519af09912 Add segment coverage ledger and mid-project plan for Crusader decompilation
- Created `crusader_segment_coverage_ledger.csv` to track segment coverage status, types, and known functions.
- Introduced `plan-mid.md` as a mid-project tracker outlining progress, objectives, and implementation priorities for the decompilation effort.
- Added scripts in `pyghidra_plans` to assist with instruction window dumping and reference inspection for the object at `0x4588`.
- Implemented functionality to scan for instruction uses of specific targets related to the decompilation project.
2026-03-21 16:19:46 +01:00
55b3187469 Add script to apply NE far call fixups from TSV files
This commit introduces a new script, `apply_ne_far_call_fixups.py`, which processes internal and import far call fixups from TSV files. The script includes functions to parse addresses, load fixup data, patch internal far calls, and annotate import calls. It handles conflicts in fixup mappings and provides detailed output on the applied patches and any skipped instructions. The script is designed to enhance the handling of NE format far calls in Ghidra.
2026-03-21 13:25:21 +01:00
d1447197b3 Add JSON output schema and enhance CLI command aliases for improved usability 2026-03-21 09:50:09 +01:00
a56851f994 Enhance CLI functionality and improve common utilities
- Added new commands to the CLI for dumping regions, renaming functions by address, and setting various types of comments.
- Implemented JSON output formatting for CLI commands.
- Introduced functions for decompiling and disassembling functions, as well as retrieving cross-references.
- Enhanced common utilities with functions for reading memory regions, iterating Java items, and managing function metadata.
- Added suppress_output context manager to hide process output during Ghidra startup.
- Updated existing functions to improve error handling and output formatting.
2026-03-21 09:44:35 +01:00
24d4416003 Add various scripts and JSON plans for Ghidra project
- Introduced `seg043_boundary_repair.json` to manage function boundaries in segment 043.
- Created `read_file.py` for reading and printing file content size.
- Added `resolve_bb4f.py` to resolve specific function call targets.
- Implemented `resolve_top_targets.py` to find resolved NE targets for top-called wrapper functions.
- Added `script_contents.txt` to summarize NE relocation far calls.
- Updated `tier4_ghidra.txt`, `tier4_ghidra_check.txt`, `tier4_output.txt`, and `tier4_result.txt` with function call statistics.
- Created `tier5_errors.txt` for error logging and `tier5_output.txt` for additional function call statistics.
- Established `tools` directory with helper scripts for the Ghidra project, including CLI and common functionalities.
- Implemented command-line interface in `cli.py` for various project operations.
- Added `common.py` for shared functions and configurations across tools.
- Introduced `validate_fixups.py` to validate NE relocation fixups against known addresses.
2026-03-20 23:50:39 +01:00
6b9eb205d4 Continued decomp 2026-03-20 00:24:27 +01:00
Marco
8e35ffeae7 Changed project data 2026-03-19 18:15:41 +01:00
Marco
2e6a19d294 Added data 2026-03-19 18:14:57 +01:00
Marco
b96aaf48c2 First commit 2026-03-19 16:39:57 +01:00