FYI: I only have an AR. If you're using GS then completely ignore what I say.
For Pokemon Sapphire, you need a different (M) Code than the normal one.
As for masterballs, here is the code:
C674B60F
B309F994
that should work. They'll appear in the first slot of the Pokeballs pocket.