This file is a reversed version of TPU's libfont.prx (fontfunk) library
Based on the libfont.prx binary, with reference to hz86/mgspw, a locolization plugin for Metal Gear Solid: Peace Walker
Constants and Struct Definitions are from PPSSPP & hz86/mgspw & Web.
- Set up
PSPDEV
environment - Run
make
- Replace the origin
libfont.prx
with the built one - Rename your custom font and put it at
USRDIR/fonts.pgf
- Get a replica of
oldfont.prx
and put it atUSRDIR/oldfont.prx
- Decrypt the original
libfont.prx
in the game using Linblow/pspdecrypt - Edit it in a hex editor. Find the
sceLibFont
string ( insegment_2
)( inand change it to.rodata
, referenced in.lib.ent
)sceLibFttt
. - Rename it to
oldfont.prx
The only two things PSP Kernel use to identify a function exported by a moudule is its export name referenced in .lib.ent
and the fucntion NID.
Thus we can create a moudule with the same export name and function NIDs to substitute the original module, and bridge between the game and original module by loading and calling functions in the original module as long as the original module's export name has been changed to an unused value.
-
ftttlib.h
&ftttlib,S
contains information from the modifiedoldfont.prx
-
exports.exp
is used to generate export entries of the fontfuck library. -
fontfuck.c
is the main file. It wraps and modifies the behavior of 3 functions insceLibFont
- The Library was tested on PSP Hardware.
PPSSPP
artifacts in this PR works fine.jpcsp
doesn't seem to work