Well, in some cases it is possible to patch the same changes achieved through a cheat code into the ROM, e.g. here is a guide to patching codes into Mario 64. I'm not aware of any general use tool that can do this, but they exist for other consoles, so it may be possible.