Cross-platform refactoring of deHSP#3
Open
xsyetopz wants to merge 21 commits intokaz-mighty:masterfrom
Open
Conversation
Restructure the legacy flat-layout deHSP project into a modern multi-project solution. The core decompiler logic (Ax2/Ax3 decoders, DPM extraction, EXE unpacking, pipeline, abstractions, resources, and localization) now lives under src/HspDecompiler.Core with proper namespace alignment. All legacy root-level source files are removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Command-line interface for the decompiler, providing batch processing and scriptable access to the decompilation pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Cross-platform GUI replacing the legacy WinForms dialog. Uses Avalonia with MVVM pattern, includes About dialog, localized resource strings (en/ja), and service abstractions for the decompiler pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
21 tests covering DPM extraction, EXE unpacking, pipeline orchestration, Shift-JIS encoding, and crypto transforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite README.md for the restructured multi-project solution. Add README.ja.md as a Japanese language version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Replace four mojibake strings (corrupted Shift-JIS Japanese) with English equivalents: header comment, HSP 3.3 section markers, and a mangled function name replaced with hsp_internal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Replace legacy Visual Studio-heavy gitignore with a streamlined version covering .NET build artifacts, JetBrains IDEs, and macOS/Linux OS files to match the cross-platform Avalonia stack. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Add Directory.Build.props setting version (2.0.0 / 2.0.0.0), product name, copyright, and SPDX license identifier across all projects. Replace the layered Japanese custom license (zlib/libpng + Public Domain) with standard 0BSD, preserving original MinorShift attribution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Populate the DpmFiles DataGrid by threading DpmFileEntry list through DecompilerResult and into the ViewModel's ObservableCollection after Task.Run completes on the UI thread. Format log timestamps as human-readable seconds ([ 0.120s]) instead of raw millisecond counters (00000120:), applied consistently to Write() and Error() methods. Fix async deadlock in GuiProgressReporter by yielding via Task.Yield when off the UI thread. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix error handling: replace bare catches with specific IOException, preserve inner exceptions, log failures instead of swallowing them - Extract long methods: DecompressDpm (147->3 methods), RunAsync, RenameFunctions, GetLine, ToString - Fix typos: OparatorPriority, pluginFuction, Lables, Scoop->Scope - Remove dead code: unused ReadCsvFields, setters, GetPrimives, counters - Wire up ReadCsvFields to eliminate 3x duplicated CSV parsing - Consolidate GetStartAx/SeekStartAx into single method - Extract magic numbers to named constants across 6 files - Rename camelCase private methods to PascalCase - Enable nullable reference types across all 4 projects (194 warnings fixed) - Upgrade System.CommandLine from 2.0.0-beta4 to 2.0.5 stable - Add .editorconfig, .gitattributes, GitHub Actions CI pipeline - Enable EnforceCodeStyleInBuild, TreatWarningsAsErrors, SDK analyzers - Clean up .gitignore (219->43 lines) Verified: zero diffs in decompiler output against reference file. 21/21 tests pass. 0 warnings, 0 errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Adds build, test, format, check, clean, and per-platform publish targets. VERSION defaults to 2.1.0, overridable via make arg. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
ubuntu-latest ships .NET SDK 10 which enables AnalysisLevel 9, introducing CA2022 and other rules that don't exist in SDK 8. rollForward: latestFeature allows any 8.0.xxx patch but blocks 9/10. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Stream.Read can return fewer bytes than requested. ReadExactly (available since .NET 7) throws if the stream ends early, which is the correct behavior for structured binary parsing. 11 occurrences across ExeExtractor, DpmExtractor, and AxData. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Apply file-scoped namespaces, PascalCase properties, named constants for magic numbers, fix bare catch in DpmExtractor, remove fake async from CrackDpmEncryptionAsync, extract HSP2/HSP3 magic strings, rename banned variable names, fix dictionary CSV enum parsing that broke Hsp3Dictionary loading, add integration test for VocalShifter decompilation, and reset Ax2 decompiler state between runs. Verified: 22/22 tests pass, decompiled output matches reference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have, with some "external" assistance, refactored the application to modern standards.
We had also tested this on a major 30k line .hsp project, and it decompiled successfully.