Commit graph

25 commits

Author SHA1 Message Date
KeybadeBlox
ccd2cd37a5 Defend against spurious references during mangling
Ghidra sometimes identifies random numbers as pointers, which trips up
our mangler script when it encounters them as they generally have no
type information.  We now use heuristics to ignore such references.
2026-02-13 23:43:35 -05:00
KeybadeBlox
022582003d objdiff symbol matching refinements
With name mangling, objdiff.json no longer needs massive lists of which
names to match to what.  Some function signatures were also minorly
refined.
2026-02-12 21:19:46 -05:00
KeybadeBlox
13048fef71 Tidy up compiler options
Nothing affecting codegen.
2026-02-12 16:07:14 -05:00
KeybadeBlox
f193fef3ce Enable string pooling
JSRF evidently has string pooling enabled (i.e. program-wide
deduplication of strings), so we'll want it in our compiler settings as
well.
2026-02-09 23:53:24 -05:00
KeybadeBlox
e6d7acfa05 Fix some disconnected symbols in objdiff
This will be so much easier when we can export with name mangling.
2026-02-07 22:09:26 -05:00
KeybadeBlox
e668b52cd0 Add to GameObj::removeChildrenFromObjList() 2026-02-05 21:11:11 -05:00
KeybadeBlox
63002e0f08 Add data type import for Ghidra 2026-02-04 19:52:12 -05:00
KeybadeBlox
44a8d704ef Populate JSRF/GameData.cpp 2026-01-12 22:59:47 -05:00
KeybadeBlox
fbc5619d6a Begin populating JSRF/GameData.hpp 2026-01-12 09:46:56 -05:00
KeybadeBlox
d11f2fd538 Delink JSRF/GameData 2026-01-11 20:46:54 -05:00
KeybadeBlox
683818b637 Separate compiler optimization flags
The /O2 used before was actually a preset for a bunch of more specific
flags, which are now written explicitly for clarity and easier
modification later.
2026-01-03 16:13:44 -05:00
KeybadeBlox
4dae5206c0 Minor decompiling in JSRF/Core 2026-01-02 23:14:59 -05:00
KeybadeBlox
1b08163c08 Disable inlining
JSRF appears to have it disabled despite other optimizations.  Even if
it was enabled, anyways, we'd still be decompiling the post-inlining
functions and wouldn't want any further inlining to take place (we want
the compiler to compile each function the way we write it).
2026-01-02 22:38:23 -05:00
KeybadeBlox
08abfd3913 Finish populating JSRF/Core 2026-01-02 00:05:52 -05:00
KeybadeBlox
f8578b0871 Continue populating JSRF/Core 2025-12-31 23:03:36 -05:00
KeybadeBlox
f65876135d Remove redundant compilation flag
The flag in question was already the default setting.
2025-12-31 23:02:58 -05:00
KeybadeBlox
71937e4a97 Begin populating JSRF/Core 2025-12-31 11:14:07 -05:00
KeybadeBlox
22a8c350eb Correct .data section ranges in delinked objects
The change in the previous commit was a silly case of not thinking
things through, not realizing that the .data range moved to Core.obj was
nowhere near the beginning of the section as it should be.  g_game has
been moved back into Jet2.obj (time will tell if this is correct) and a
missed data strucure at the beginning of .data (where it ought to be)
now makes up Core.obj's .data portion.
2025-12-30 00:39:14 -05:00
KeybadeBlox
a25790e8a6 Delink Core.obj 2025-12-29 00:44:27 -05:00
KeybadeBlox
8eda56dcdf Change executable section flags to please objiff
objdiff assumes that all symbols in executable memory sections are code,
which led to misbehaviour due to .rdata and .data being marked as
executable in JSRF.  We now set these sections to non-executable in
Ghidra to work around this.
2025-12-21 19:36:09 -05:00
KeybadeBlox
5692ee9531 Minor code tidying
Mostly consistency with file headers and other such trifling things.
2025-12-18 22:09:47 -05:00
KeybadeBlox
b40e9a0c56 Rename Microsoft decompile directory to XDK
Felt more appropriate to name it after the library it's implementing
than the vendor.
2025-12-18 21:55:03 -05:00
KeybadeBlox
83553a3d24 Remove padding from Jet2.obj address ranges 2025-12-18 09:30:29 -05:00
KeybadeBlox
1c8eb137ee Arrange decompilation source/target in directories 2025-12-17 21:46:17 -05:00
KeybadeBlox
1a48d4323e Complete delink workflow; separate from decomp
We can now create a fresh Ghidra project, import the JSRF executable
into it, import symbols into it, delink object files from it, and then
decompile with objdiff.  Just needs some documentation.
2025-12-16 22:30:49 -05:00