Commit Graph

887 Commits

Author SHA1 Message Date
Léo Lam 71fc0f35e8
Merge pull request #51 from leoetlino/optimized-checker
tools: Add a new, optimized check tool
2021-07-31 12:23:40 +02:00
Léo Lam 6e30bbea32
tools: Add a new, optimized check tool
Reimplements tools/check.py in a faster language (picked Rust to learn
and play with the language and because installing dependencies is way
easier than with C++)

On my machine, a full run takes ~160ms with this new implementation
and 49s (!) with check.py.

The main performance improvements come from not having to use
pyelftools and the Python bindings of Capstone (which are both insanely
slow and perhaps less efficient than they could be). Function checking
is now also performed in parallel rather than sequentially for yet
another significant performance boost.

Other tweaks include editing Capstone and the bindings to avoid
computing expensive things that we don't actually need and avoiding
dynamic memory allocations in hot paths as much as possible.

check.py will be removed after the setup instructions are updated.
2021-07-30 23:52:55 +02:00
Léo Lam 2204f46b0b
Remove expected/
The intention was to catch functional regressions in non-matching
functions but this doesn't actually work well because referenced
code and data may have moved after a function was dumped, in which
case the reference checker is unable to verify that function calls
and data references are still correct.

Considering this increases the amount of complexity in the checker
and makes the workflow more complicated for contributors, let's just
drop this mechanism. It isn't worth it.

Putting binary files in the repo is also pretty meh.
2021-07-30 20:06:14 +02:00
Léo Lam ea030c356c
Contributing: Mention that functions can be stubbed 2021-07-28 12:20:53 +02:00
Léo Lam 1d4c815fba
Merge pull request #50 from AlexApps99/master
CSV formatting improvements
2021-07-27 12:12:56 +02:00
AlexApps99 a68c979491
CSV formatting improvements documentation 2021-07-27 12:58:48 +12:00
AlexApps99 3c336794a4
CSV formatting improvements 2021-07-27 12:44:10 +12:00
Léo Lam d7b2e846b9
Merge pull request #49 from AlexApps99/master
Add #ifdef declarations for NON_MATCHING code
2021-07-26 13:07:34 +02:00
AlexApps99 42807160cf
Add #ifdef declarations for NON_MATCHING code 2021-07-26 23:05:19 +12:00
Léo Lam 5bd0cde8bb
Merge pull request #48 from AlexApps99/master
Removed invalid functions inside PauseMenuDataMgr::isOverCategoryLimit
2021-07-26 11:55:27 +02:00
AlexApps99 88bcc9eec1
Removed invalid functions inside PauseMenuDataMgr::isOverCategoryLimit 2021-07-26 19:35:51 +12:00
Léo Lam b4f312d14f
Fix perf.data entries in .gitignore 2021-07-25 14:35:43 +02:00
Léo Lam 6a87b27ad2
Merge pull request #47 from AlexApps99/master
Improved .gitignore
2021-07-25 11:55:06 +02:00
AlexApps99 b68b1df6f1
Improved .gitignore 2021-07-25 21:34:20 +12:00
Léo Lam 206d7781e5
tools: Use bundled copy of objdump to simplify setup 2021-07-23 18:05:23 +02:00
Léo Lam 0ebf0dac9b
Contributing: Add a link to the cheatsheet 2021-07-23 13:00:19 +02:00
Léo Lam 8f8308787d
Contributing: Mention Trello board 2021-07-23 12:57:49 +02:00
Léo Lam 3fc83fd051
Streamline project setup by automating NSO conversion (if needed) 2021-07-23 12:40:49 +02:00
Léo Lam fc04f184c8
readme: Add note about cloning the repo in WSL 2021-07-23 00:10:54 +02:00
Léo Lam bc5593aa44
setup: Use subprocess.check_call instead of os.system 2021-07-22 22:07:25 +02:00
Léo Lam d37951ab72
build: Fix local toolchain path 2021-07-22 11:20:55 +02:00
Léo Lam d74354c480
Merge pull request #46 from leoetlino/build-cleanup
Clean up build toolchain (and use musl for libc) and simplify setup
2021-07-22 02:57:32 +02:00
Léo Lam 5d7fa0aede
Simplify build setup by adding a setup script 2021-07-22 02:45:01 +02:00
Léo Lam 8cf3dd776b
build: Clean up build toolchain (and use musl for libc)
Using musl is required to match several functions that use <math.h>
floating point functions like isnan.

This also removes a dependency on devkitA64. We previously only needed
it because Clang insisted on using GCC to link the final executable
owing to the use of a "bare metal" target like aarch64-none-elf.
We can make Clang invoke the linker itself by using a Linux target.
2021-07-21 22:26:11 +02:00
Léo Lam 1c8152de22
build: Only use response files to link (for perf reasons) 2021-07-21 21:13:03 +02:00
Léo Lam 39d81d6178
Add decompilation cheatsheet (from hackmd.io) 2021-07-14 21:33:56 +02:00
Léo Lam 6312bcfef2
Merge pull request #44 from MonsterDruide1/MusicDefinition
ksys/snd: Add MusicDefinition
2021-07-13 14:35:55 +02:00
Léo Lam ec59fe675b
ksys/snd: Fix matching issues in MusicDefinition
The wrong overload of agl::utl::Parameter::init was being used.
The one that only takes a name will use the name string for the label
as well; this is not what the original function does, as the label
for all the parameters is set to "" (the empty string).
2021-07-13 14:32:03 +02:00
MonsterDruide1 1322b57b55 ksys/snd: Add MusicDefinition 2021-07-13 13:30:51 +02:00
Léo Lam 754523a246
Merge pull request #43 from MonsterDruide1/RagdollControllerKeyList
ksys/phys: Add RagdollControllerKeyList-Resource
2021-07-09 13:24:49 +02:00
MonsterDruide1 3be9a6927d ksys/phys: Add RagdollControllerKeyList-Resource 2021-07-09 13:13:52 +02:00
Léo Lam e5e8804fa9
Merge pull request #42 from MonsterDruide1/InvalidLifeConditions
ksys/act: Add InfoData::InvalidLifeConditions
2021-07-08 19:30:56 +02:00
MonsterDruide1 0750a987ac ksys/act: Add InfoData::InvalidLifeConditions 2021-07-08 19:28:00 +02:00
Léo Lam 41d724e17e
data: Fix two warnings 2021-07-07 18:22:03 +02:00
Léo Lam 34eb9dc0e7
data: Fix _ZTVN3agl3utl9ParameterIN4sead7Color4fEEE address 2021-07-07 15:32:03 +02:00
Léo Lam 48e70b92bf
ksys/map: Fix more matching or equivalency issues 2021-07-07 14:34:02 +02:00
Léo Lam 1b6c549a38
ksys/map: Fix matching issues 2021-07-07 14:04:39 +02:00
Léo Lam 4b6b81b190
Fix -Wdelete-incomplete warnings 2021-07-07 13:56:35 +02:00
Léo Lam 21883027ef
Mark _ZN4ksys3map13PlacementTreeD1Ev as matching 2021-07-07 13:56:35 +02:00
Léo Lam f726f3b68d
ksys/act: Add Actor getDummyBaseProcLink() 2021-07-07 13:56:28 +02:00
Léo Lam a638e3dba1
Merge pull request #40 from notyourav/place_mgr
ksys::map placement classes
2021-07-07 13:50:12 +02:00
theo3 b74df64276 move ForestRenderer and ClusteredRenderer 2021-07-06 15:43:57 -07:00
Léo Lam c808135ef1
query: Fix matching issue in CheckRupee 2021-07-06 00:04:02 +02:00
Léo Lam 694ab9da9d
Merge pull request #41 from notyourav/queries
match some ai::Query
2021-07-06 00:02:12 +02:00
theo3 60dd80779a match some ai::Query 2021-07-01 21:05:10 -07:00
theo3 4cba2eb093 ksys::map placement classes 2021-07-01 21:02:46 -07:00
Léo Lam 112c1f987d
Merge pull request #36 from notyourav/lol
shootingStarMgr
2021-06-29 02:13:59 +02:00
theo3 0eef5b3933 shootingStarMgr 2021-06-28 12:04:10 -07:00
Léo Lam 710c91eeff
tools: Make register pair tracking more robust by using insn.regs_access() 2021-06-28 18:51:08 +02:00
Léo Lam 98f3c3d971
lib: Update sead 2021-06-28 18:50:47 +02:00