Mednafen/Beetle PSX – PGXP arrives! In-depth look!


Read the entire article here -


Thank you for the PGXP enhancement.

It seems that a recompiler can increase the performance of a software rasterizer by 2- to 4-fold (see PCem which uses its recompiler for the Voodoo rasterizer and cpu emulation). Wikipedia also claims that mame has a recompiler for its Voodoo software rasterizer, but I haven’t verified this.

Typically, the dynamic recompilers are written optimally for the host architecture, but this requires a lot of effort. Instead, the pcem recompiler uses a set of assembly codes per function that directly corresponds to the C code path. I haven’t confirmed whether this was an automated process; and whether the Clang system can do this.

Here is a summary of a discussion on stackoverflow: Given file foo.c: clang -S -emit-llvm foo.c Outputs foo.ll which is an LLVM IR file

Then compile LLVM IR to assembly: llc foo.ll Outputs foo.s for the host machine architecture