From 94300afb6cf7dab80251426c46453d9e0d4ea609 Mon Sep 17 00:00:00 2001 From: jonschz <17198703+jonschz@users.noreply.github.com> Date: Tue, 17 Jun 2025 23:10:00 +0200 Subject: [PATCH] Add minimal documentation for ALPHA, README cleanup (#1570) * Add minimal documentation for ALPHA * README cleanup --------- Co-authored-by: jonschz --- reccmp-project.yml | 5 +++++ tools/README.md | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/reccmp-project.yml b/reccmp-project.yml index b433ce46..fd9a2ef1 100644 --- a/reccmp-project.yml +++ b/reccmp-project.yml @@ -38,3 +38,8 @@ targets: - 0x100fb080 # memset etc. - 0x100f9570 + ALPHA: + filename: ALPHA.DLL + source-root: LEGO1 + hash: + sha256: dc7e5ed8ec9d96851126a40c4d23755f1783a8df61def44c667dfaa992ac509e diff --git a/tools/README.md b/tools/README.md index 95d8fb00..0d75e48e 100644 --- a/tools/README.md +++ b/tools/README.md @@ -32,23 +32,28 @@ It is therefore advisable to search for the corresponding function in `BETA10` w Unfortunately, some code has been changed after this beta version was created. Therefore, we are not aiming for a perfect binary match of `BETA10`. In case of discrepancies, `LEGO1` (as defined above) is our "gold standard" for matching. -### Re-compiling a beta build (**WIP**) +## Pre-Alpha + +* `ALPHA` -> `LEGO1D.DLL` + +This debug build is hardly used since it has little benefit over `BETA10`. + + +# Re-compiling a beta build If you want to match the code against `BETA10`, use the following `cmake` setup to create a debug build: ``` -cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Debug -DISLE_USE_SMARTHEAP=OFF +cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_BUILD_TYPE=Debug -DISLE_USE_SMARTHEAP=OFF -DISLE_BUILD_BETA10=ON -DISLE_BUILD_LEGO1=OFF ``` -**TODO**: If you can figure out how to make a debug build with SmartHeap enabled, please add it here. -If you want to run scripts to compare your debug build to `BETA10` (e.g. `reccmp-reccmp`), it is advisable to add a copy of `LEGO1D.DLL` to `/legobin` and rename it to `BETA10.DLL`. +If you can figure out how to make a debug build with SmartHeap enabled, please add it here. -### Finding matching functions +If you want to run scripts to compare your debug build to `BETA10` (e.g. `reccmp-reccmp`), it is advisable to add a copy of `LEGO1D.DLL` from Beta 1.0 to `/legobin` and rename it to `BETA10.DLL`. Analogously, you can add `LEGO1D.DLL` from the Pre-Alpha and rename it to `ALPHA.DLL`. + +# Finding matching functions This is not a recipe, but rather a list of things you can try. * If you are working on a virtual function in a class, try to find the class' vtable. Many (but not all) classes implement `ClassName()`. These functions are usually easy to find by searching the memory for the string consisting of the class name. Keep in mind that not all child classes overwrite this function, so if the function you found is used in multiple vtables (or if you found multiple `ClassName()`-like functions), make sure you actually have the parent's vtable. * If that does not help, you can try to walk up the call tree and try to locate a function that calls the function you are interested in. * Assertions can also help you - most `.cpp` file names have already been matched based on `BETA10`, so you can search for the name of your `.cpp` file and check all the assertions in that file. While that does not find all functions in a given source file, it usually finds the more complex ones. * _If you have found any other strategies, please add them here._ - -## Others (**WIP**) -* `ALPHA` (only used twice)