-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started (CCC)
This guide will help you do the initial setup for building the CCC patch. It's assumed you're running Windows. It's possible to fully build the patch on other OSes but it's not covered by this guide.
Required tools:
- JDK
- Any modern version should work, to avoid issues just install Temurin 11 x64.
- IntelliJ IDEA
- Free community version is fine.
- Homebrew PSP SDK
- PPSSPP
Required files:
- Extracted retail CCC Japanese ISO.
-
Decrypted GAME.DNS file from the ISO (located
PSP_GAME/INSDIR/GAME.DNS
). -
Decrypted EBOOT.BIN file from the ISO (located
PSP_GAME/SYSDIR/EBOOT.BIN
). -
fine.exe
from the English patcher (locatedres/patch/fine.exe
).- You can also build it from sources.
- Downloaded GitHub repositories:
You need to set up few environment variables:
-
FE_PROJECT_BASE
- empty directory you created somewhere for all the project files. -
PSPSDK_HOME
- should beC:\pspsdk
. -
PPSSPP_HOME
- should be PPSSPP installation directory.
Restart Windows Explorer (or just restart your PC) after setting them to avoid issues.
Open translation-tools/build.gradle
in IntelliJ IDEA.
Wait for the project to fully load and download dependencies.
Try to build it with Build -> Build Project
, if it doesn't work fix the issue before continuing.
Create %FE_PROJECT_BASE%/Fate/TMP
directory and inside it add:
-
GAME.cpk
which is the decryptedGAME.DNS
file. -
NPJH50505.BIN
which is the decryptedEBOOT.BIN
file. -
PSP_GAME
andUMD_DATA.BIN
which are the directory and file you get from extracting the Japanese CCC ISO. -
toolkit-template
directory downloaded from GitHub repository. (if you downloaded it as ZIP extract it and rename the directory totoolkit-template
) -
fine.exe
which was described above.
After adding those files tree listing of the TMP
directory should look like this:
┌ TMP
│ GAME.cpk
│ NPJH50505.BIN
│ UMD_DATA.BIN
│ fine.exe
│
├───PSP_GAME
│ └───(remaining ISO files)
│
└───toolkit-template
└───ccc
└───(remaining template files)
If the above steps were done you can now run CccSetupStep1.kt
script with IntelliJ IDEA
(found in extra-ccc/src/main/kotlin/tl/extra/ccc/cli
).
This script will extract game files and print Done
when completed, it'll take a while. If it fails delete
%FE_PROJECT_BASE%/Fate/Unpack
directory, fix the issue and try to run it again.
Now run CccSetupStep2.kt
script.
This script will convert toolkit template into an actually usable toolkit files.
It will print Done
when completed. If it fails delete %FE_PROJECT_BASE%/Fate/_CCC Toolkit
directory,
fix the issue and try run it again.
You can now build the patch. Run CccRepackager.kt
script (found in extra-ccc/src/main/kotlin/tl/extra/ccc/patcher
).
First build will take longer.
If everything was set up correctly then after a while PPSSPP will open running patched version of CCC. This build will run
but won't have any translations, textures or patched interface files.
This script might be rerun any time to produce new build. In general, it should be rather resilient to errors so if something fails,
just fix the issue and rerun it. To perform full clean build delete %FE_PROJECT_BASE%/Fate/_CCC Toolkit/build
and
%FE_PROJECT_BASE%/Fate/_CCC Toolkit/im
directories before running it.
If the first build succeeds you can delete files from the TMP
directory, they won't be needed anymore.
If you got this far then you've completed the tools setup, you now have a working setup you can adjust for your target language. Here are some tips and next steps (in subjective order of importance) you will need to complete in order to create full patch.
- Making backups is critical. That way you will be able to revert to a known good state in case of any issues.
- Use
git
for tracking source code changes and changes to the_CCC Toolkit/src
directory.
- Use
- Start reading and modifying the
translation-tools
source code.- Sooner or later you will need to adjust the source code for your target language, it is not possible to create full translation patch otherwise.
- Start entering translations in translation units found in
_CCC Toolkit/src/translations
.- Note that this script format is not designed to be manually modified, I recommend creating a script to combine
script-*.txt
files into some other format suitable for translation tool such as Weblate, then download output from your translation tool and convert it back toscript-*.txt
files. Alternatively you might of course just modify the toolkit to read from a different format, or download translations from remote source on each build (in that case implement your code in thedownloadRemoteTranslations
function). - Some entries might require additional changes in the tools source code, this is especially true for the EBOOT entries.
- We've provided our config and timings for the subtitles, if your translation has the same number of lines that the English text used (i.e. the number of lines matches the number of line timings in the notes) then you don't need to modify them.
- Be careful with how actual and literal new lines (
\n
) are used. DAT unit ignores actual new lines and only respects literal new lines (\n
). Since you will be starting from scratch you may reconfigure the tools to unify those rules. - A special
script-used.txt
file is provided, "1" indicates this entry had non-blank translation in the English patch, "0" indicates the opposite.
- Note that this script format is not designed to be manually modified, I recommend creating a script to combine
- Add
custom-pak-files
from the patched English CCC ISO.- Those are primarily translated textures and patched interface files. You will need to recreate those for your target language but the ones from the English patch will provide a good starting point.
- See Toolkit tree (CCC) page for reference which files are needed.
- The most important files to add are the fonts files:
font.txb
,kanzi.bin
,ruby.bin
,ruby.txb
.
- Setup png2tex.
- The
Png2TexCcc
script provides automated tools for converting the TXB textures to PNG back and forth, which you will eventually need to create translated textures for your target language.
- The
- Subtitle opening.
- To add subtitles for the opening create patched
DEMO01.PMF
andDEMO02.PMF
then replaces the files in_CCC Toolkit/src/custom-iso-files/PSP_GAME/USRDIR/MOVIE
.
- To add subtitles for the opening create patched
- Add files from the PSN CCC ISO.
- The tools also builds patch compatible for the PSN ISO. This won't work until the files from the PSN ISO are added to
the toolkit
_CCC Toolkit/src/stock
directory:- Add
PSP_GAME/SYSDIR/EBOOT.BIN
asNPJH50505-PSN.BIN
(do not decrypt it). - Add
PSP_GAME/SYSDIR/OPNSSMP.BIN
asOPNSSMP-PSN.BIN
. - Add
PSP_GAME/PARAM.SFO
asPARAM-PSN.SFO
.
- Add
- The tools also builds patch compatible for the PSN ISO. This won't work until the files from the PSN ISO are added to
the toolkit
- Public build can be created by changing
publicBuild = false
topublicBuild = true
inCccRepackager
. This will create distributable PatchFS files in the build directory.- Due to how name replacement is implemented public build will fail until translations are entered. To mitigate this you
can disable name replacement generation, for example by adding
return emptyMap()
as first line in thecreateNameReplacementMap
method.
- Due to how name replacement is implemented public build will fail until translations are entered. To mitigate this you
can disable name replacement generation, for example by adding