-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to get more involved #84
Comments
Roughly 90% of the names are correct since they were taken from the symbols. It's basically down to renaming the missing bits, such as void __cdecl gendung_418D91() Priorities (by importance):
Side Projects:
|
Maybe these priorities are beyond my capabilities and knowledge. Could you explain a little more how one would go about something like 4 and 7? I'm failing to understand where the PSX/Debug symbols are coming from. Or could you point me to pervious commit where some of these refactoring have been done. |
Refactoring has not yet been started because bug fixing is more important. That's probably the last thing that will happen to the project. The symbol files will be uploaded soon into a separate repository. |
@ttdonovan Sure! Hope this may help a bit. Feel free to ask questions, and we'll try to get anyone interested up to speed!
The are originally from the Japanese release of Diablo on Playstation 1. The CD contained debug information in a .SYM file, the format of which has been reversed, so we can recover type information, variable names, etc, for the PSX release. @galaxyhaxz will upload the .SYM files from each realese of Diablo 1 on Playstation, but for now, we can refer to https://github.com/sanctuary/psx which contains debug information recovered from the Diablo (Japan) [SLPS-01416] release. For the brave out there, the tool used to parse the SYM files is availabe at https://github.com/sanctuary/exp/tree/master/cmd/sym_dump and can be installed by running There is still much to do, so any help is warmly welcome. Reversing feels like solving a big puzzle. Once you get into it, it can become quite addictive. Consider yourself warned ;) Edit: Oh, and more specifically for item 7. (naming of local variables). Debug info about local variables was also included in the SYM files, see for instance https://github.com/sanctuary/psx/blob/93e9bfee26f188db87daf2fc927f584ee9a0eb2c/funcs/source/automap.cpp#L34 // Path: C:\diabpsx\SOURCE\AUTOMAP.CPP
// Addr: 0x801620A0
void AmDrawPlayer__Fiiiii(int x0, int y0, int x1, int y1, int PNum) {
int PNum;
struct LINE_F2 *L2;
} |
@mewmew thanks for the guidance. I've started messing around with Hex-Rays and few questions about loading the Diablo.exe.
I've attache the output - can you confirm it appears to have loaded and ran the
After running the |
Yes, defaults are fine. Portable executable. Processor type i386 (80386). Both detected as based on the log you posted:
The error you probably got ("69F0E8: can't rename byte as 'DS' because the name 'DS' is a register name.") is an issue with IDA. It should work for other decompilers.
Both Devilution and the notes repo have the intended aim to get as close as possible to document the original game. Devilution is closer in the sense that the same names have been used for functions as based on the SYM debug info. The notes repo has tried to use consistent naming for functions, e.g. prefix with source file name. See for instance drlg_l1_load_dun, which is defined in // drlg_l1_load_dun loads tile IDs, monsters and objects from the given dungeon file.
void drlg_l1_load_dun(char *dun_path, int view_x, int view_y); I think in the future, the notes repo will be brought closer to that of Devilution, and vice versa. To keep closer to the original instead. Related to enum defs, that may simply be an error. Either in the notes repo, or in Devilution, and if so, should be fixed. Happy reversing! Cheers, |
@ttdonovan The symbol files are now live here: https://github.com/diasurgical/scalpel |
We should consider summarizing a set of steps in |
Will do when I have time. I'll try to clean up the readme in the next few days. |
Just wondering what are some areas of this project that need help with more contribution? Is one of the goals in this project to have naming conventions of data structures and function similar to what has been defined in https://github.com/sanctuary/notes? For example would the following be refactored in
monster.h
?https://github.com/sanctuary/notes/blob/master/data/monster.h
The text was updated successfully, but these errors were encountered: