The infinite ammo cheat for Star Wars: Battlefront 2 on PlayStation 2 is entered on the D-pad:
Up, Down, Left, Down, Down, Left, Down, Down, Left, Down, Down, Down, Left, Right
Put it in as one continuous sequence without pausing between inputs, and make sure you are on a screen that accepts codes before you start. It is a long string, so a missed press means starting over rather than getting a partial effect.