14 Commits

Author SHA1 Message Date
Ranieri 669114f3f6 Feature/runtime review codegen fixes (#87)
* feat: small fixes on code gen

* feat: added code gen test

* feat: rename IOP

* fix: fix special case on JR
feat: added code generator test

* feat: ps2 logs now need special macros

* feat: a lot of regressions test
feat: use test to fix bugs on runtime
fix: fix incorrect instructions on code generator
feat: added missing decode on r5900 decoder
feat: added scissor on rasterizer

* feat: better ghidra plugin analyzer
fix: fix real bug on function finding on elf analyzer

* feat: some logs on GS
feat: added more syscalls stubs
feat: added more ps2 stubs

* feat: added missing stub
2026-02-27 03:44:59 -03:00
Ranieri 8584c0613a Feature/runtime gs recompiler instructions (#73)
* feat: basic gs
feat: basic rasterizer
fix: a lot of fixes to runtime stubs
feat: basic vif intercepter
feat: return "ok" for some stubs
feat: disassembly code as comment
fix: fix code gen instructions set
fix: again jump
feat: remove unused macro
fix: fix some problematic macros
feat: track delayslots on runtime
and many more

* feat: added missing files

* fix: fix instruction test
2026-02-22 02:20:42 -03:00
Antonio Guastella d7701f9ea7 fix: reslice entry functions without container (#70) 2026-02-20 10:07:31 -03:00
Antonio Guastella ea8283d034 Issue "#14 - More Instruction Support" (#68)
No new code, just tests XOXO
2026-02-19 10:56:11 -03:00
Ranieri 4334e74342 fix: fixed entry slicing logic to avoid “same tail repeated” generation (#67) 2026-02-18 23:34:27 -03:00
Ranieri 8b1f4e00f2 Fix/fix jump tables (#65)
* feat: multipass discover additional entrypoints

* feat: added helpers for returning
feat: added game overrides

* added missing PS2_SHUFFLE_EPI8 macro after report from @playmer

* fix: fix jump tables

* fix: fix MMI comments
2026-02-18 22:07:20 -03:00
Antonio Guastella cf5f57180f Feature/mc0 IO + Win IO fixes (#57)
* mc0: map memory card paths to mcRoot and related io tests

* Fix mc0 test setup to initialize temp paths

* fix: implementing WIN32 I/O support in syscalls

* fix: avoid fioWrite deadlock

Do not lock the fd map while calling getHostFile; use the syscall file mutex around fwrite instead
2026-02-17 12:40:57 -03:00
Ranieri c4555f6723 feat: split runtime code in small files to be easy to develop (#56)
* feat: split runtime code in small files to be easy to develop

* feat: split stubs in inl files

* feat: function auto link function treat functions with underscore as same as without underscore

* feat: remove underscore prefix from stubs
2026-02-17 03:00:59 -03:00
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 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
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
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
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