There's nothing specific against cheat codes that should make the Sephiroth battle impossible. However, depending on your cheat choices, you may make the battle more difficult. I'm assuming the one that would destroy you is Safer Sephiroth, the one-winged angel form. In addition to all of its special abilities, it also has the following two bonuses that you probably triggered in your cheat methods compared to your non-cheating methods.
- Each character at Level 99 (except Aeris) adds 30,000 max HP, 2 Attack, 20 Def, 5 Magic, and 16 MDef.
- Casting Knights of the Round on Jenova∙SYNTHESIS (who you fight just before Sephiroth) adds another 80,000 max HP.
Numbers were pulled from the Final Fantasy Wiki. The previous form of Sephiroth also gains increased HP from level 99 characters and using KotR on Jenova, but not nearly as much.
The total boost he can reach for HP alone is a factor of 5: from his normal 80,000 to 400,000. His other stats, of course, are also improved, notedly with a strong emphasis on defense. This is what makes an under-level party (and one who failed to acquire Knights of the Round) actually easier to face off against Sephiroth. I know I managed to defeat him on my first playthrough at subpar levels (Cloud only know his Meteor limit, Vincent his second, and I had Cait Sith with Dice... I don't even know what I was playing at that time).
The only other factor you may have run into is that in using cheat codes you might've slouched in better party upkeep, such as by forgetting to equip proper status defense (he has a lot of those) and buff the party consistently. Past these things, though, using cheat codes shouldn't have any direct effect.
A note should be made that the faux final battle that ensues afterwards is cited to have some interesting effects when using cheat codes, none of which cause Game Over though. It does reinforce that cheat codes themselves shouldn't have affected the previous fight.
How it works
When GameShark (and other game enhancer products/homebrew) gets loaded by the console, the enhancer is what launches the actual game. In doing so, it leaves behind a Code Handler in the system RAM and "hooks" the game's programming.
Specific locations in a game's programming that get executed roughly every frame (like reading the controller data) are where "hooks" will be placed. (because SDKs are used, this makes finding hooks that work in all games for a system much easier)
What the hook actually does is redirect the flow of programming to the Code Handler the enhancer left behind. Once the Code Handler is finished executing, it returns the flow of programming back to the point of hijacking.
If you are familiar with GameShark's "Master Code", that is what sets the hook.
(other enhancers - like Gecko OS for Wii - don't need master codes because the enhancer itself has a handful of SDK-based hooks that it can "find" in the game while it loads.)
Structure of codes
Now a code itself is separated into THREE parts:
- The CodeType (this is USUALLY the first byte of the code-- the first 2 Hex Characters). CodeTypes are specific to the enhancer.
- The address in ram that the CodeType will use.
- The value the codetype will use at the specified address.
The most common CodeTypes are:
RAM Writes (typical options are 8bit, 16bit, or 32bit)
With RAM Write, the CodeHandler will take the value and place it at the address. (changing whatever was there, like setting your health to 100!)
Conditionals (typical options are >, <, =, !=)
With Conditionals, the CodeHander reads the value at the code's address and compares it to the value in the code. IF the comparison returns true, then the CodeHander will execute the next line in the code. (how many lines it executes is up to the enhancer and often is an option in the codetype itself!)
There is plenty more info we could dive into, but that should give you a good basis for understanding. =)
Source: Game hacker since 1999, founder of http://GeckoCodes.org
Best Answer
You will not be able to use those via Cheat Engine, because as ardaozkal points out, those are memory addresses for a gameshark. Because you are using an emulator, the memory addresses Cheat Engine sees are those of the emulator as a whole.
If you want to use Cheat Engine to cheat in Pokemon Yellow, you can, but you will have to use its search feature to find the right addresses.
The first step is to open the process of the emulator in Cheat Engine. Next, you will need to search for how much money you have. You will pick a scan type of exact value, a value type of "All" (it'll PROBABLY be a 2 byte value, but we can't be sure) and then hit first scan.
In game, change the amount of money you have. Win a trainer battle or buy something. Then enter the new value into cheat engine and hit "Next Scan". Repeat this until you narrow down the possible addresses to one (it'll be listed up to three times due to us not specifying the size.)
Double click that address, then double click the value in the lower part of the window. Type in whatever new amount of money you want.
One thing to note when using cheat engine to modify games running in an emulator is the concept of endianness https://en.wikipedia.org/wiki/Endianness. Cheat engine only handles little endian, whereas some systems/games/emulators use big endian. In those cases you will have to manually convert your values before searching. Gameboy Color was little endian, so you will most likely not have to convert anything.