I just did some reasearch on this site and some others. I found out many things first you need three key programs to make the codes work: Pokesav of course, trash byte's, and legal checker if you are trying to make legit pokemon. Also,http://projectpokemon.org/forums/showthread.php?218-~Guide-to-44h-45h-46h-47h-and-85h-Values~, show you most of the hex numbers you will need to have to be able to make your pokemon codes to work. To make them legit use http://bulbapedia.bulbagarden.net/wiki/Main_Page to find the moves and the ablities they have could have. You will also need a trainer id which can be easily found in the game but to find the secret id use this code in an Action Replay 94000130 FFF30000 62111880 00000000 B2111880 00000000 DA000000 00000086
D7000000 00000088 D2000000 00000000 The secert id will appear in the money amount you have be sure you don't have over 5 digits in the money section if you do don't worry just spend money to get it to 5 digits. Finally, after you finished the pokemon you want save the file somewhere you can get to easily open up Trash Byte's and load the .PKM file it will fix the code errors and then run it through legal checker. Then all you have left is to open up the file up again in pokesav than just click on export ARDS codes.