Homebrew Homebrew game Chrono Trigger - Switch port

  • Thread starter Thread starter Nagaa
  • Start date Start date
  • Views Views 4,770
  • Replies Replies 62
  • Likes Likes 20
any chance for crt filter? I assume something like that would be pretty unlikely for the wrapper, or am I wrong? the would make it the perfect port and give it the perfect retro feeling :D
 
For testing. I've made some more tweaks to improve performance on lower OC. And I've added the ability for it to change resolutions when docking and undocking. Screen width and height parameters are now specific to handheld and docked.

i.e.

Code:
screen_width_handheld 1280
screen_height_handheld 720
screen_width_docked 2560
screen_height_docked 1440

I'm getting pretty stable 720p performance at 1581 MHz CPU, 614 MHz GPU, 1331 MHz RAM (which for me personally translates to 7-8 hours of gameplay on battery since the loads are relatively low).
Post automatically merged:


Update: I've migrated to ini format for the config. It will automatically translate your config.txt into a config.ini. And I've now added my 3 patches into ct_nx.nro to be used at runtime.

INI:
[config]
screen_width_handheld = 1280
screen_height_handheld = 720
screen_width_docked = 2560
screen_height_docked = 1440
language = en
game_font_path = /switch/ct/ChronoType.ttf
game_font_scale = 0.90
text_shadow_scale = 1.0
text_shadow_alpha = 200
; --- Runtime binary patches ---
cursor_fix = 1
remove_bilinear_filter = 1
remove_mobile_ui = 1

`cursor_fix`, `remove_bilinear_filter`, and `remove_mobile_ui` can be set to a value of 1, and used with the unmodified original libchrono.so. Patches are read and used at runtime, so the .so never gets modified.


I'll see if i can also get .ctp mod packs loading so we dont need to modify resources.bin.
 

Attachments

Last edited by ppkantorski,
For testing. I've made some more tweaks to improve performance on lower OC. And I've added the ability for it to change resolutions when docking and undocking. Screen width and height parameters are now specific to handheld and docked.

i.e.

Code:
screen_width_handheld 1280
screen_height_handheld 720
screen_width_docked 2560
screen_height_docked 1440

I'm getting pretty stable 720p performance at 1581 MHz CPU, 614 MHz GPU, 1331 MHz RAM (which for me personally translates to 7-8 hours of gameplay on battery since the loads are relatively low).
Post automatically merged:


Update: I've migrated to ini format for the config. It will automatically translate your config.txt into a config.ini. And I've now added my 3 patches into ct_nx.nro to be used at runtime.

INI:
[config]
screen_width_handheld = 1280
screen_height_handheld = 720
screen_width_docked = 2560
screen_height_docked = 1440
language = en
game_font_path = /switch/ct/ChronoType.ttf
game_font_scale = 0.90
text_shadow_scale = 1.0
text_shadow_alpha = 200
; --- Runtime binary patches ---
cursor_fix = 1
remove_bilinear_filter = 1
remove_mobile_ui = 1

`cursor_fix`, `remove_bilinear_filter`, and `remove_mobile_ui` can be set to a value of 1, and used with the unmodified original libchrono.so. Patches are read and used at runtime, so the .so never gets modified.

Tested. remove_bilinear_filter is not being applied. It's easy to spot with the text

Many thanks to Nagaa and you for bringing and improving this port!
 
  • Like
Reactions: ppkantorski
Tested. remove_bilinear_filter is not being applied. It's easy to spot with the text

Many thanks to Nagaa and you for bringing and improving this port!
This should fix it. Thanks for the heads up.

I've also fixed the video scripts. Before at the end of the intro video it would halt on a black frame, then controller input would send keyboard input popping up the keyboard menu. Now the video progresses to after the video properly, returning you back to the main menu, and clicking a button takes you to the main menu as well.
 

Attachments

This should fix it. Thanks for the heads up.

I've also fixed the video scripts. Before at the end of the intro video it would halt on a black frame, then controller input would send keyboard input popping up the keyboard menu. Now the video progresses to after the video properly, returning you back to the main menu, and clicking a button takes you to the main menu as well.

I tested this fix and the bilinear filter is still not being removed, I made sure the config file had the remove_bilinear_filter entry set to 1, all I did was put this nro file inside the ct folder which contains the unmodified game files.

Fonts don't seem to be working either, again all I did was add the .ttf file to the ct folder. not sure if I'm missing some steps.
 
Last edited by tmnr1992,
I tested this fix and the bilinear filter is still not being removed, I made sure the config file had the remove_bilinear_filter entry set to 1, all I did was put this nro file inside the ct folder which contains the unmodified game files.

Fonts don't seem to be working either, again all I did was add the .ttf file to the ct folder. not sure if I'm missing some steps.
I can confirm its working for me. I visually see the difference with the font with remove bilinear filter on. You need to download the font file i mentioned before if you want to use the custom font (or grab another one, but ensure you are pointing it to the correct path in your config.ini). Can you post your config.ini?
 
  • Like
Reactions: tmnr1992
I can confirm its working for me. I visually see the difference with the font with remove bilinear filter on. You need to download the font file i mentioned before if you want to use the custom font (or grab another one, but ensure you are pointing it to the correct path in your config.ini). Can you post your config.ini?

The issue with the font was that I hadn't set the path as you mentioned, now it's working great:
[config]
screen_width_handheld = -1
screen_height_handheld = -1
screen_width_docked = -1
screen_height_docked = -1
language = en
gl_threaded = 1
gl_no_error = 1
game_font = 1
game_font_path = /switch/ct/ChronoType.ttf
game_font_scale = 1
game_font_xscale = 1
text_shadow = 1
text_shadow_alpha = 230
text_shadow_scale = 1
cursor_fix = 1
remove_bilinear_filter = 1
remove_mobile_ui = 1

Unfortunately I still can't disable the bilinear filter, I tried setting remove_bilinear_filter to 0 and then back to 1 and manually patching libchrono.so with your python script, but neither option worked, could it be an issue with my game files?
 
Not sure... but here is bilinear on (default behavior).
2026062820021800-219DEFC6AAFA48A38248F3BFD92171F1.jpg


vs bilinear off
2026062820041000-219DEFC6AAFA48A38248F3BFD92171F1.jpg
 
  • Like
Reactions: tmnr1992
Not sure... but here is bilinear on (default behavior).
View attachment 580077

vs bilinear off
View attachment 580078

Nevermind I see the difference now, it is working as intended, my issue was that the character sprites still have some kind of smoothing effect, which I though was also part of the filter, but for that I would need to patch the resources.bin file.
 
Nevermind I see the difference now, it is working as intended, my issue was that the character sprites still have some kind of smoothing effect, which I though was also part of the filter, but for that I would need to patch the resources.bin file.
You gotta replace your sprites themselves. Ive set it up now to load .ctp mod packs so you don't have to patch your resources.bin manually. That way users can easily customize everything to their heart's content manually. Just cleaning it up a bit more, then I'll share this version. And you can modify ctp mod packs just by unzipping them, modifying files, then re-zipping them (.ctp is the same as .zip).
Post automatically merged:

I'll think if there is a more efficient way, but this way works pretty well for now. The `.modcache` is generated when mods are present once at the start of the game, then reused for subsequent relaunches of the game based upon the mods that are present. It takes a little time to generate the cache on startup, but after its generated loading is just as fast as before.

Mods go in `/switch/ct/mods/` in `.ctp` format.

Screenshot 2026-06-28 at 11.46.14 PM.png
 

Attachments

Last edited by ppkantorski,
Hey! thanks for all those fixes!!! trying em now!
Post automatically merged:

Hmmmm how to patch the resources.bin? or how about the ctp files?



Fonts are OK now, but that soft filter bothers me a lot.
 
Last edited by RenQ,
I was properly able to patch the text and input buttons now. For some reason the port was handling all controller input via keyboard layout, so I've added a few more baked in patches to ensure that it uses the DS layout + android controller rather than a keyboard. But this fix required me to tweak some of the language files too with a .ctp mod.

2026062918441400-219DEFC6AAFA48A38248F3BFD92171F1.jpg

Post automatically merged:

Any fix for the diagonal movement issue?
Ive created a patch to fix this too now, baked into the config. It looks very nice. I'll share another version soon for testing.

 
Last edited by ppkantorski,
I was properly able to patch the text and input buttons now. For some reason the port was handling all controller input via keyboard layout, so I've added a few more baked in patches to ensure that it uses the DS layout + android controller rather than a keyboard. But this fix required me to tweak some of the language files too with a .ctp mod.

View attachment 580239
Post automatically merged:


Ive created a patch to fix this too now, baked into the config. It looks very nice. I'll share another version soon for testing.

View attachment 580246

Gooooooooood job! Thanks!
 
  • Like
Reactions: ppkantorski
You can use generate_text_ctp.py to generate switch_text_patches.ctp in the same folder.

Code:
python3 generate_text_ctp.py resources.bin

This will create the text patch for proper button dialogue for all languages. Just add the patch to the /switch/ct/mods/ folder after. Controller input is also no longer using keyboard buttons, but instead using simulated android controller buttons. This also means the menu button is Y now, not PLUS (just like the SNES / DS version).

I've bundled the font in this version. The config.ini gets automatically generated now with all the default presets, so unless you are modifying something you don't need to touch it.

Mod cache generation is now prompted with an initial loading screen so you don't just think the game froze or anything. Diagonal fix has also been implemented, as well as a cleanup of the button glyphs / text. Text alignments have been slightly tweaked a tad too.

And lastly all saves are moved to /switch/ct/saves/ to clean up the ct folder a bit. It will migrate your save data automatically the first time you run the app.
 

Attachments

Last edited by ppkantorski,
You can use generate_text_ctp.py to generate switch_text_patches.ctp in the same folder.

Code:
python3 generate_text_ctp.py resources.bin

This will create the text patch for proper button dialogue for all languages. Just add the patch to the /switch/ct/mods/ folder after. Controller input is also no longer using keyboard buttons, but instead using simulated android controller buttons. This also means the menu button is Y now, not PLUS (just like the SNES / DS version).

I've bundled the font in this version. The config.ini gets automatically generated now with all the default presets, so unless you are modifying something you don't need to touch it.

Mod cache generation is now prompted with an initial loading screen so you don't just think the game froze or anything. Diagonal fix has also been implemented, as well as a cleanup of the button glyphs / text. Text alignments have been slightly tweaked a tad too.

And lastly all saves are moved to /switch/ct/saves/ to clean up the ct folder a bit. It will migrate your save data automatically the first time you run the app.
hola gracias por tus modificaciones queria saber como genero o creo esos archivos cpt ? tengo tus archivos .py pero nose como usarlos o como crearlos o implementarlos con el archivo resources.bin.
 
hola gracias por tus modificaciones queria saber como genero o creo esos archivos cpt ? tengo tus archivos .py pero nose como usarlos o como crearlos o implementarlos con el archivo resources.bin.
Drag the python script into the folder on your computer that has your resources.bin. Then cd into the directory via terminal / command prompt, run the command I posted, and it will generate a .ctp patch for the text. For other ctp mods, you can look at mods for Steam. It’s basically just a .zip file, renamed to .ctp. You can extract it, modify files in it, then re-zip it, and rename the extension to .ctp, add it to your mods folder. There are tools already from Steam version modders out there to make and modify .ctp bundles.
Post automatically merged:

You can also make all the videos HD just like on PC.

https://github.com/davidluzgouveia/ct-fmv

This tool lets you convert all the .dat video files to .mp4 and back.

IMG_7921.jpeg


Personally, I used 1080p 30hz AI-upscaled versions of the FMVs. It’s a nice quality-of-life enhancement for custom mod setups, in my opinion.
 
Last edited by ppkantorski,
  • Like
Reactions: Jmb

Site & Scene News

Popular threads in this forum