A GameShark master code is a primary code that needs to be enabled before any other cheat codes can function. Not all games require the use of a master code.
A master code is sometimes needed as a means of interrupting the game's code so that the cheat codes can be inserted. The master code generally alters a portion of game code that is constantly being executed, such as reading input from the controller. Some prominent examples of games that require a master code are the Pokémon series and Final Fantasy 7. Master codes and cheat codes work only in random access memory (RAM) and thus cannot permanently alter a game's code, but saved games made while a code is active may be affected.