If its a ROM then there's nothing you can do
ROMs aren't legit so they'll be glitching.
HGSS have some kind of anti emulation patch
(I think )
So HGSS ROMS hate everone who tries to emulate it.
If it's not a ROM either once you've tried to cheat on it and because you've messed up the coding it might be dodgy. Or your game cartridges just ...worn out
This happens alot in Desmume and Drastic when I emulate .