You can get codes here:
http://geckocodes.org/index.php?chid=G&r=*&l=all
download as .txt file
the default folder for txt codes files is sd:/txtcodes or usb:/txtcodes (if you is not using an sd)
put the txt file in that folder and make sure it uses the same ID as the game you want
for example: Super Mario sunshine ID is GMSE01, so, the txt file with the codes must be named as GMSE01.txt
Now, open the settings for the game you want in usb loader gx, go to "Game Load" option and change "Ocarina" to ON
click save, then go to "Ocarina" option and Enable the cheats you want to use, then click in "Create". Just start the game and see if it works.
You can also download cheat codes from usb loader gx, just click on the 'ocarina option' in game settings, and if it don't find any file in txtcodes folder, it will ask if you want to download