mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
6970f3a2c4
Fill the remaining TODO_NAMED bodies in Kernel/Stubs/VU.cpp so the out-of-line libvu0 macro-mode routines write their documented results to the caller's output operand instead of leaving guest memory untouched (the TODO_NAMED stub throws, or returns -1 once its per-name warning budget is spent, and never writes the destination). Implements the matrix/geometry/clip/lighting entry points: CameraMatrix, InversMatrix, MulMatrix, TransMatrix, RotMatrix, NormalLightMatrix, LightColorMatrix, DropShadowMatrix, ViewScreenMatrix, RotTransPers/RotTransPersN, ClipScreen/ClipScreen3/ClipAll, MulVector, ScaleVectorXYZ, DivVector/DivVectorXYZ, InterVector/InterVectorXYZ, ClampVector, ecossin. Pure input->output arithmetic over guest memory through the existing getMemPtr/getConstMemPtr and getRegU32/ctx->f[] accessors already used by the implemented sceVu0 functions in the same file. No new runtime state, no signature changes, no VU.h changes. The clip and view/shadow routines provide the functional contract callers rely on (nonzero => offscreen; projection by formula shape) rather than a bit-exact reproduction of the COP2 sticky clip-flag register. Adds ps2xTest/src/ps2_vu_tests.cpp covering each routine against its documented formula.