KeybadeBlox
836b5eaa41
Incorporate known names from Smilebit code
...
The Yakuza 1 and 2 rereleases on the Wii U export function symbols,
preserving their names, and some debug data was also available in a PS2
release, providing some struct definitions. These have been used to
rename analogous classes, functions, and member variables to the same
names used by Smilebit, plus a more general imitation of their naming
and typing conventions (i.e. Win32 style).
2026-03-31 20:24:13 -04:00
KeybadeBlox
e7e9d3b1be
Add .gitignore entry for Ghidra project
...
May make it an official recommendation to have a project named "JSRF"
here.
2026-03-22 20:20:46 -04:00
KeybadeBlox
d6a356a0c3
Handle undefined WINDIR on POSIX platforms
...
The test for whether it was defined was failing with an error on
platforms where it wasn't defined.
2026-03-22 20:18:09 -04:00
KeybadeBlox
57fc53ebfb
Add IMAGE_TLS_DIRECTORY32 struct
...
With this, everything is delinking again.
2026-03-21 22:35:37 -04:00
KeybadeBlox
da6865e5f6
Fix typo in Core.hpp
...
Was making builds fail.
2026-03-21 20:56:49 -04:00
KeybadeBlox
3e8622f369
Mention Wine for non-Windows OSs in documentation
2026-03-21 20:55:52 -04:00
KeybadeBlox
8fc7d8d918
Add recommended tool versions to Getting Started
2026-03-21 15:23:03 -04:00
KeybadeBlox
b95a664688
Add ehdata.h
...
Bunch of spooky low-level exception handling stuff needed to delinking
working again.
2026-03-20 23:29:39 -04:00
KeybadeBlox
e58f774d82
Add various data structures
...
Stuff needed to get Core.obj delinking again.
2026-03-20 23:29:02 -04:00
KeybadeBlox
709bbf9a54
Default to __cdecl for name mangling
...
It's definitely ideal for everything to be declared explicitly, but it
would require either manual intervention or a new dedicated script to do
this for typedefs (that aren't methods), so we'll do this as the least
worst option.
2026-03-20 23:26:20 -04:00
KeybadeBlox
a2b777d666
Disable function thunking when importing
...
Thunked functions can confuse the delinker extension into thinking that
multiple symbols have the same name and lead to delinking failures (with
no diagnostic, conveniently).
2026-03-20 23:25:19 -04:00
KeybadeBlox
ac40f3e8cf
Update symbol table
2026-03-20 23:24:55 -04:00
KeybadeBlox
69d5bd1dbe
Summarize unrecognized types in EnhancedImport
...
Helps a little to debug things.
2026-03-20 20:10:16 -04:00
KeybadeBlox
98d88cc212
Support earlier Java releases
...
Existing code was written for Java 25, which is more recent than many
people have on hand. The modified scripts appear to run well on Java
21.
2026-03-20 13:20:51 -04:00
KeybadeBlox
76e7714722
Typo
2026-03-20 10:09:33 -04:00
KeybadeBlox
c713c2c8ea
Fix permissions on symbol table
2026-03-20 10:08:51 -04:00
KeybadeBlox
da67c782e3
Remove unneeded .gitkeep
2026-03-20 10:03:24 -04:00
KeybadeBlox
6b12d397ff
Update headers in make_header.sh
...
Forgot to change after Std.hpp got turned into stddef.h.
2026-03-20 08:27:08 -04:00
KeybadeBlox
4dded02b58
Minor revisions to xapi0.c comments
2026-02-23 08:23:02 -05:00
KeybadeBlox
823b19371c
Fully decompile xapi0
2026-02-22 14:04:18 -05:00
KeybadeBlox
4e20347b7c
Decompile mainCRTStartup()
...
Incidental changes include fixes for Xapi in the Makefille and
objdiff.json, as well as new compiler flags for Xapi.
2026-02-22 10:41:15 -05:00
KeybadeBlox
cbd63865e2
Rename Smilebit library to MUSASHI
...
Strings in the .rdata portion of the Smilebit in-house library code
suggest that this was its name, with its contents having names beginning
with an M (whence MMATRIX, for example).
2026-02-22 10:37:59 -05:00
KeybadeBlox
d7abbb79c0
Update progress
...
I really need to automate this.
2026-02-20 21:56:45 -05:00
KeybadeBlox
9cfd8b5bf3
Delink/begin decompiling entry point
...
That is, xapi0.obj, which has been renamed from crt0.obj because it
appears to be part of the Xbox libraries rather than the C runtime.
2026-02-20 21:50:00 -05:00
KeybadeBlox
9b6c91a12e
Prevent repeated name mangling
...
A symbol could be encountered more than once in headless mode if it
appeared in the body of a function. The mangler script now tracks which
symbols have been seen to avoid this.
2026-02-20 21:44:43 -05:00
KeybadeBlox
bbe9d63294
Update documentation for new scripts
...
This includes the enhanced export/import scripts and the class fixup
script (with the name mangler being used implicitly). With this, the
switchover from simple label-based sharing of Ghidra project information
to rich type and class information is complete.
2026-02-19 21:16:38 -05:00
KeybadeBlox
aac010eb71
Add PlayerCharId type
2026-02-19 21:16:11 -05:00
KeybadeBlox
be4946eb98
Replace Matching: with Status:
...
We'd rather have three stages (unimplemented, nonmatching, matching)
than just matching or not.
2026-02-19 21:11:42 -05:00
KeybadeBlox
73b59a95cd
Fix main() detection in mangling script
2026-02-19 21:06:17 -05:00
KeybadeBlox
522bf8be7f
Fix static init/exit section names in objects.csv
2026-02-18 20:42:45 -05:00
KeybadeBlox
0b10a02ad7
Fix whitespace in Ghidra export script output
...
Functions with no arguments had a trailing tab.
2026-02-18 20:41:51 -05:00
KeybadeBlox
e0313fa0ba
Add class fixup Ghidra script
2026-02-18 20:24:43 -05:00
KeybadeBlox
adc30bb531
Move Std.hpp into CRT directory
...
It's also been renamed to stddef.h since all it contained was the
definition of NULL, which lives in that header in a standard C library.
2026-02-18 19:22:13 -05:00
KeybadeBlox
3c4f0e72b8
Miscellaneous Ghidra script tweaks
...
No behavioural changes.
2026-02-18 18:18:24 -05:00
KeybadeBlox
c020c2e247
jsrf.h scalar deleting destructors return void *
...
They previously returned a pointer to the class type, but this isn't
accurate to the signature indicated by MSVC's name mangling.
2026-02-18 18:15:25 -05:00
KeybadeBlox
fd6815ae42
Complete Ghidra symbol import script
2026-02-17 22:30:10 -05:00
KeybadeBlox
92179ea9bd
Add C symbol support to name mangling Ghida script
2026-02-17 20:19:14 -05:00
KeybadeBlox
d435282a8b
Compile XDK code as C
...
It appears to be all C code (especially the non-C++ parts of the C
runtime, of course), so we'll compile it as such.
2026-02-17 10:27:50 -05:00
KeybadeBlox
149af27b9c
Fix CRT calling conventions
2026-02-17 09:56:58 -05:00
KeybadeBlox
5d22c39db6
Finish Ghidra data symbol import
...
Function import still remains.
2026-02-16 21:38:28 -05:00
KeybadeBlox
0922356a40
Begin Ghidra symbol import script
2026-02-16 00:21:55 -05:00
KeybadeBlox
e0c9fc4c83
Use enhanced for loops in Ghidra mangler script
2026-02-16 00:21:22 -05:00
KeybadeBlox
1e8ae0f72f
Finish Ghidra symbol export script
2026-02-16 00:20:57 -05:00
KeybadeBlox
d81bd646fa
Tiny source tweaks
...
Fixing some errors in the C runtime and making the main() formatting
more similar to everything else.
2026-02-14 23:12:06 -05:00
KeybadeBlox
84c165a0af
Complete basic build process
...
We now have generation of an import library for linking against the Xbox
kernel, linking together an .exe, and converting it to an .xbe via cxbe.
Some further development of tooling aside (including filling in some
features in cxbe to better match the original JSRF executable), all that
remains now is to write decompiled code.
2026-02-14 23:05:32 -05:00
KeybadeBlox
43f4d10461
Begin enhanced export Ghidra script
2026-02-14 23:02:55 -05:00
KeybadeBlox
c38d9b5628
Tiny steps towards implementing C runtime
2026-02-14 12:34:28 -05:00
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
d372c17094
Miscellaneous name mangling improvements
...
Improved error reporting, skipping undesirable symbols like jump tables,
skipping special symbols like intrinsics, etc.
2026-02-12 21:15:52 -05:00