mirror of
https://github.com/libretro/parallel-ps2.git
synced 2026-11-10 03:11:38 -10:00
Vif_Transfer.c and Vif_Codes.c are the VIFcode interpreter and its command handlers in C89. Each handler is written once against the unit index and the table holds a thin per-unit entry for it, the per-unit state is reached through VIF_X, VIF_XCH and VIF_XREGS, and the C++ is reached through small C entry points: vif_unpack_setup and vif_unpack in Vif_Unpack.cpp, mtvu_write_col and mtvu_write_row in MTVU.cpp, gif_unit_transfer_direct for DIRECT and DIRECTHL, and vu1ExecMicro and vifCmdHandler now with C linkage. tests/eevifcode feeds both units seeded VIFcode streams, every command and unknown codes included, in random chunks and as tags, and checks the result against the previous C++.