Commit Graph

106 Commits

Author SHA1 Message Date
Ranieri aa76cdbbf7 Feature/vu fixes (#55)
* fix: added missing header include for gcc

* fix: small thread fix on syscalls
fix: fix incorrect VU translations (they was using wrong register)

* feat: added authoritative system for function extraction, this will prevent functions overlap when we have debug symbols
2026-02-16 23:00:35 -03:00
Antonio Guastella 4961710407 Issue 11 vu0 macro (#48)
* Add missing VU0 Special1 macro translations

* Fix VU0 macro decode and field ops

Align Special2 decoding with fhi_flo, implement VCLIPw/VABS, and fix field variants (VADDx/VSUBx/VMULx). Keep C++17 compatibility by replacing unordered_set::contains and remove dead ADDIU return. Update Special2 metadata for VWAITQ.

* vu0: complete macro mappings and add coverage test

* review: clean up vu macro handling

* fix: restore C++20 contains in code generator

* fix: correct VU0 Special2 instruction encoding in decoder test

---------

Co-authored-by: Antonio Guastella <antonioguastella@energine.it>
Co-authored-by: Ranieri <ran-junior@hotmail.com>
2026-02-16 22:20:48 -03:00
Ranieri b7973593ee fix: added missing header include for gcc (#54) 2026-02-14 13:00:36 -03:00
Ranieri 8f747334d6 feat: refactor analyzer to not realy only on debug symbols (#53)
fix: patching NOP things that code gen already know how to handle
feat: added a bug on JAL/J/JAR code gen
feat: enhanced tom file
fix: fix memory layout for ps2 macros
feat: added a lot of not working garbabe to runtime (fix later)
feat: some code organization
feat: added new tests
feat: update readme
2026-02-13 15:02:34 -03:00
Enrique Martinez 1d1b79d5f0 Added ARM64 (Apple Silicon) support using sse2neon (#50)
* feat: implemented arm64 support for builds

* feat: explicitly add compiler flags when needed
2026-02-06 20:12:36 -03:00
Enrique Martinez c0447ce3c1 fix: trailing backslash in PS2_STUB_LIST macro (#49)
Remove trailing backslash without continuation that was causing
preprocessor errors during array initialization in ps2_runtime_calls.h.
2026-02-06 13:04:02 -03:00
Ranieri 5e4361a1c6 feat: added new empty stubs (#47) 2026-02-06 01:39:52 -03:00
Ranieri df745d7ee9 Feature/analyzer workflow cleanup (#46)
* feat: added thread naming functionality
feat: improve function name sanitization

* fix: fix decode jump target
feat: better word read
feat: prevent unexpect path on output tom
feat: analyzeEntryPoint now lookup for correct entry insted of rely on names
fix: fix CFG graph
feat: mangled name are not handle and sysfunctions anymore
feat: heavy loop flag count is not 5 from 3

* fix: skip/stubs now under [general]
fix: patch address now saves as true hex insted of decimal with 0x
fix: fix J/JAL reconstruction (PC+4)
feat: better C++ identifier sanitization
feat: decoder now dont stop the execution anymore just keep going
2026-02-06 00:27:38 -03:00
Ranieri e567c4cf60 feat: added thread naming functionality (#44)
feat: improve function name sanitization
2026-02-05 02:07:49 -03:00
M. Sami Gürpınar 5d3be0e2e7 fix portability issue (#41)
* refactor: update function name checks to use contains method

* refactor: update code generation to use static_cast

* refactor: made member methods const

* refactor: made range-based loop

* refactor: make one variable constructor explicit

* refactor: remove redundant else

* refactor: turn includes to forward declarations

* refactor: brace placements turned into allman style

* refactor: structed binding for readability and clarity, used emplace_back to prevent extra-copied object

* fix: add dwarf_private.h include

* fix: update GPR_U32 and GPR_S32 macros to use _mm_extract_epi32 for SSE/AVX intrinsics
2026-02-03 10:25:22 -03:00
Ranieri 5e9139dd22 feat: better decoder (#40)
* feat: use rabbitizer for decode MIPs instructions

* feat: cleanup code generator

* feat: fix test and add a sefe check for generate functions
2026-02-02 13:29:12 -03:00
Ranieri d7306d2095 Feature/better analyzer v1 (#39)
* feat: pin dependencies

* feat: dwarf parse

* fix duplicated functions

* feat: small code cleanup

* feat: crash prevent

* feat: modernize code

* feat: split m_libFunctions from m_knownLibNames

* feat: added ghidra loader

* feat: auto bootstrap name for recompiler
2026-02-02 01:49:51 -03:00
M. Sami Gürpınar b7086d89de structured binding, fix copying extra object (#38)
* refactor: update function name checks to use contains method

* refactor: update code generation to use static_cast

* refactor: made member methods const

* refactor: made range-based loop

* refactor: make one variable constructor explicit

* refactor: remove redundant else

* refactor: turn includes to forward declarations

* refactor: brace placements turned into allman style

* refactor: structed binding for readability and clarity, used emplace_back to prevent extra-copied object
2026-02-01 03:03:37 -03:00
Joshua T. Fisher e770572116 ps2_recomp lib and runner separation, fix runtime default build (#36)
* Separate the exe and lib of ps2_recomp.

* Move macro header to runtime, don't generate it, apply generated diff.
2026-01-31 19:29:18 -03:00
Salman Chishti 6d5e1fd66b Upgrade GitHub Actions to latest versions (#32)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-31 13:52:59 -03:00
Salman Chishti ea63da371b Upgrade GitHub Actions for Node 24 compatibility (#31)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-31 13:32:35 -03:00
M. Sami Gürpınar c218c64348 Made member methods const (#34)
* refactor: update function name checks to use contains method

* refactor: update code generation to use static_cast

* refactor: made member methods const

* refactor: made range-based loop

* refactor: make one variable constructor explicit

* refactor: remove redundant else

* refactor: turn includes to forward declarations

* refactor: brace placements turned into allman style
2026-01-31 13:14:56 -03:00
M. Sami Gürpınar e8f0c69de6 Use contains and static_cast (#33)
* refactor: update function name checks to use contains method

* refactor: update code generation to use static_cast
2026-01-30 11:04:22 -03:00
Joshua T. Fisher 91678d1977 Merge pull request #29 from playmer/playmer/fix_lookup
Convert CodeGenerator::m_symbols to unordered_map to fix O(n) lookups
2026-01-29 00:20:46 -03:00
Ranieri 9174f52511 Merge pull request #28 from DanielSvoboda/Artifact
Add artifact upload step in build workflow
2026-01-28 17:17:27 -03:00
DanielSvoboda cb20d0298a Add artifact upload step in build workflow
Add step to upload build artifacts for PS2Recomp.
2026-01-28 17:03:20 -03:00
Ranieri 327d1f2d7f Merge pull request #27 from ran-j/feature/more-re-stubs
feat: added more empty stubs
2026-01-28 16:40:17 -03:00
Ran-j af53b08543 feat: added more empty stubs
feat: added TODO_NAMED to help debug
fix: disable for now audio thread
2026-01-28 16:37:18 -03:00
Ranieri 8ede5f083c Merge pull request #25 from DanielSvoboda/main
Handle dots in function names during sanitization
2026-01-28 16:09:14 -03:00
DanielSvoboda 8430496557 Handle dots in function names during sanitization
Replace dots with underscores in function names
2026-01-28 15:34:37 -03:00
Ranieri 7b5f254f63 Merge pull request #20 from Lucasnribeiro/fix-static-keywords
fix: non static variable
2026-01-28 12:30:28 -03:00
Ranieri e8c2152eca Merge pull request #24 from ej-sanmartin/feat/add-discord-link
Feat: Add new Community Discord link to README.md
2026-01-28 12:28:21 -03:00
Edgar Jr San Martin 3e4a3ad100 Add new Community Discord link to README.md 2026-01-28 04:00:16 -05:00
Ranieri 5b119041fb Merge pull request #22 from ran-j/feature/recompiler-stub-iop
feat: add runtime stubs for missing IOP calls
2026-01-28 03:16:27 -03:00
Ran-j b8c1d7eaee feat: add runtime stubs for missing IOP calls
fix: fix small function on recompiler
2026-01-28 03:11:45 -03:00
Ranieri 7d6d7dcd3c Merge pull request #21 from playmer/playmer/cmake_and_ci
Add CI for MSVC Build
2026-01-28 02:53:06 -03:00
Joshua T. Fisher 1cf3a6af4e Add ending newline. 2026-01-27 18:03:25 -08:00
Joshua T. Fisher 3e19d84f3b Add test runner. 2026-01-27 17:48:15 -08:00
Joshua T. Fisher bf91aa5021 Make runtime optional, start a CI yml. 2026-01-27 17:30:58 -08:00
Ran-j b1f86a7597 feat: auto set runtime internal stubs and syscalls on recompiled code 2026-01-27 17:12:35 -03:00
Ran-j 7b3fee9247 refactor: remove re code veronica hacks 2026-01-27 17:06:22 -03:00
Lucas Ribeiro 6cb9b968d5 fix: non static variable 2026-01-27 14:55:56 -03:00
Ran-j ff8d354259 feat: added license file 2026-01-26 23:30:47 -03:00
Ran-j 2e08d5e87b refactor: refactor runtime and recompile for better workflow and correct generating code and analyze output 2026-01-04 22:21:50 -03:00
Ran-j 2ca84c131a feat: call main entrypoint from the ps2 game (next commits will fix some missing feature for it) 2025-12-27 14:30:03 -03:00
Ran-j 2d1f7ec07f feat: added missing v0 instructions
feat: added threads inplementation on ps2 syscalls
feat: patch entrypoint on recompiler
feat: ps2 macros now is part of the runtime
feat: use thread to hold game loop
feat: sanitize functions like point out by chrisking1981
fix: fix old instructions cast
fix: fix missing patch for opcode j
2025-12-27 11:33:24 -03:00
Ran-j 409570c709 feat: added minitest framework
feat: added some unit tests for code gen and decoder
fix: backport some bugfix from chrisking1981 branch
2025-12-26 18:33:52 -03:00
Ran-j c05d8f1809 feat: misc fixes 2025-11-29 18:19:36 -03:00
Ran-j 2f58b17243 feat: remove namespace for now 2025-11-29 12:31:11 -03:00
Ran-j 4ea08199b0 feat: now we generate header file for stub functions 2025-11-29 12:26:39 -03:00
Ran-j cd2e7f4ea8 feat: correct read values from TOM file for config manager 2025-11-29 11:28:16 -03:00
Ran-j 49dd5d99d1 feat: default single file 2025-11-29 11:11:07 -03:00
Ran-j a311b73bf7 feat: added more ps2 libs to analyze
fix: fix some cast on code gen
2025-11-29 03:09:49 -03:00
Ran-j 3a0cea3286 fix: fix code gen function parameters call 2025-11-29 02:37:06 -03:00
Ran-j 9f05b32713 feat: update ps2 stubs API 2025-11-29 02:30:18 -03:00