PretendoNetwork / HokakuCTR

On-console NEX RMC traffic dumper for the 3DS
43 stars 5 forks source link

Add mapping of process names to game names for more readable capture folders #14

Open julienheinen opened 7 months ago

julienheinen commented 7 months ago

When a capture folder is created by the plugin, it can be difficult to understand the different game names based on the process name alone. This pull request adds a mapping of process names to more readable game names, so that the capture folders have more understandable names.

The mapping is stored in a std::map object called gameNames, which contains key-value pairs where the key is the process name and the value is the corresponding game name. The code then checks if the process name starts with any of the keys in the gameNames map, and if so, replaces the key with the corresponding value.

For example, if the process name is "ctrapp", the code will replace it with "super-smash-bros3ds". If the process name is "kujira-1", the code will replace it with "Pokemon X". If no match is found, the original process name is used.

If other process names and their corresponding sets are known, they should also be added.

PabloMK7 commented 7 months ago

This will not work. The list is not complete and multiple games may share the same process name (for example ctrapp).

jonbarrow commented 7 months ago

Also the folder names contain the title ID of the title, which can easily be used to lookup the real game name online. A quick search on Google or https://3dsdb.com will tell you exactly what the game is

julienheinen commented 7 months ago

@PabloMK7, you are right that the list of process names to game names is not complete and that multiple games may share the same process name. However, the goal of this pull request is to simplify the process of identifying the game associated with a capture folder, especially for users who may not be familiar with the process names used by the 3DS. By providing a mapping of common process names to more readable game names, we hope to make it easier for users to identify their capture folders at a glance.

@jonbarrow, thank you for pointing out that the title ID can be used to look up the game name online. While this is true, I believe that providing a mapping of process names to game names within the plugin itself can still be helpful for users who may not be familiar with the title ID system or who may not want to perform an additional lookup step.

Regarding the incomplete list of process names, I acknowledge that this is a limitation of the current implementation. As suggested by jonbarrow, importing all the process names from 3DSDB could be a possible solution to create a more comprehensive library. However, I believe that even a partial mapping of process names to game names can still be useful for users, and that the current implementation provides a good starting point for further improvements.