DarkMatterCore / nxdumptool

Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
GNU General Public License v3.0
1.01k stars 75 forks source link

Provide a way to use title names from different languages at runtime. #132

Open My1 opened 1 year ago

My1 commented 1 year ago

in #36 it was mentioned that the switch apparently doesnt really deal with unicode on filepaths, which is why the dumper throws out all non-ascii chars, which especially on Consoles with an Asian langauge set makes the title literally unreadable.

however could there be a check if there are names in other languages (e.g. english) available that are a bit more recognizable and use that in the path?

DarkMatterCore commented 1 year ago

If your console language is set to English, it is already being used as the default language while retrieving NACP strings.

https://github.com/DarkMatterCore/nxdumptool/blob/3c0312961bed74e4da33199656df1e9e42451eb4/source/core/title.c#L1698-L1704

nacpGetLanguageEntry is defined in libnx -- and yes, it retrieves the console language before retrieving a language entry from the provided NACP.

In other words, if you see Japanese text, the title you're dealing with simply doesn't hold an English string. One possible solution to this issue would be using some sort of algorithm to automatically romanize text from Asian languages, but truth be told, I don't know a thing about them.

My1 commented 1 year ago

Okay granted i don't have my console set to English as i like to play my games in Japanese, and iirc you were the one asking to open an issue if needed.

And should people have to change their console to a language they potentially aren't well in anyway?

DarkMatterCore commented 1 year ago

You can alternatively use a rewrite branch build and dump data to a connected UMS device and/or USB host device. Characters will be preserved that way because external filesystems are not managed by Nintendo's FS driver, which is the one to blame here.

You can get rewrite builds from the Discord server.

And should people have to change their console to a language they potentially aren't well in anyway?

Well, that's exactly the reason why strings are retrieved from NACPs using the console language, and also the reason why internationalization support is part of the rewrite branch. Mind you, not all people speak English either -- my mother tongue is Spanish.

My1 commented 1 year ago

I see I'll look at that. I would have thought of Maybe an option to use the en title which could he highlighted as a useful thing if a significant portion is gonna be screwed up by the naming.

But when you say ums or host device you mean one could (on the rewrite branch) do the ripping to both a computer or a usb-stick? Damn that's pretty cool.

DarkMatterCore commented 1 year ago

I would have thought of Maybe an option to use the en title which could he highlighted as a useful thing if a significant portion is gonna be screwed up by the naming.

This is something I could probably consider for SD card dumping alone, yeah. I'll keep the issue open, then.

But when you say ums or host device you mean one could (on the rewrite branch) do the ripping to both a computer or a usb-stick? Damn that's pretty cool.

Yes. I wrote both the UMS driver and the USB host ABI being used in the rewrite builds.

The rewrite builds are somewhat lackluster at this moment when compared to legacy builds, mostly because of the lack of a proper UI and a unified build for all features -- we're using simple CLI-based PoCs to showcase each individual group of features, like gamecard dumping and NSP dumping. Code-wise, rewrite builds already blow legacy builds out of the water.