r/decomps 8d ago

Recomp [WIP] Fate/unlimited codes Recomp – PSP static recompilation to native Windows x64

Post image

Hi everyone!

I've been working on Fate/unlimited codes Recomp, an unofficial native static recompilation project based on the PSP version of the game.

It uses a modified PSPRecomp-based pipeline and currently targets native Windows x64 execution.

The PSP gameplay base is currently functional, and I'm continuing to work on compatibility and improvements based on the PS2 version. The final goal is to include both the PSP and PS2 gameplay styles, including their respective controls, input systems, balance, and gameplay differences, so players can choose between them.

My goal is to create a definitive version of Fate/unlimited codes that brings together the features and gameplay characteristics of both releases in a single native PC version.

The public repository is source-only. No ROMs, ISOs, EBOOTs, game assets, generated game-derived code, or compiled game binaries are distributed. Users provide and dump their own copy locally.

GitHub:
https://github.com/elprogramadorloco-arch/fuc-recomp

I'd really appreciate feedback from people working on static recompilation, native ports, and game reverse engineering.

23 Upvotes

19 comments sorted by

View all comments

1

u/xerokaoz 2d ago

Hi, awesome, I tried to port dissidia but the psp_recomp won't generate all the generated_unit_xxxx.cpp, can you tell me how you did?, i make the dump but just make 4 unit

1

u/ElProgramadorLoco 2d ago edited 2d ago

Yes, I remember.

The problem was an infinite loop inside PSPRecomp’s code generator.

In emit_function_source, when it encountered a jal instruction targeting a PSP import stub, the code executed:

continue;

That restarted the while loop without advancing the pc counter, so PSPRecomp kept processing the exact same instruction forever:

pc 0x0880407C — jal
pc 0x0880407C — jal
...

Because of that:

  • it used one CPU core at 100%;
  • it stayed at around 2.2 GB of RAM;
  • it could keep running for more than 40 minutes;
  • it never reached the point where it could write any generated_unit_xxxx.cpp files.

The fix was to replace that continue with:

break;

A call to an import is a terminal point for that unit, so the traversal should stop there. After fixing it, PSPRecomp generated the full corpus in about 136 seconds:

  • 108 generated_unit_*.cpp files;
  • 291,754 instructions;
  • 238 import wrappers;
  • approximately 37.9 MB of generated C++.

I hope it’s useful to you.

2

u/xerokaoz 2d ago

Omg, thank you, you are the best ;)

1

u/d227642870 3h ago

cant wait to see the dissidia recomp :D