Sounds interesting, please elaborate!
It's possible to reprogram some elements of those games using a few nifty tricks. It's very, very complicated to get even somewhat into it, but it felt really satisfying to pull it off on a real cartridge.
Basically, everything on the game is stored in hexadecimal, as in, numbers of base sixteen. Each digit goes from 0 to 9, then a to f, giving you an equivalent of 16 in decimal (base ten) digits. With the number of items and Pokémon, these
have to have a cap of this number. However, the spaced used to define that Pokémon/item, if it is beyond the number actually implemented, is normally miscellaneous other data interpreted in the wrong way, as there was very limited space on a cartridge.
When you use an item, it redirects the code to a certain place, allowing it to perform a certain function. With some glitch items, the place in the code they jump to can be edited by the player, such as, for an item known in Yellow as "ws m", the Pokémon stored in your current box.
This means that, adding certain Pokémon to your box in a certain order allows you to spell out a code. Seen as it's very difficult to spell out code with Pokémon, some clever people wrote an ASM script to redirect code to your items pack,
spelled out with Pokémon. This is because these Pokémon are stored in hexadecimal, and their collection of numbers can be read in many different ways. When you're displaying a Pokémon, or using it in battle, the digits operate in the normal way. When stored in a PC box, they line up certain numbers which, when read as code, spell out a jump code to redirect the code to your item pack, where it's much easier to obtain items to spell out your code.
This link here shows the entire list of addresses you can edit by doing something like this. The codes I was writing loaded a certain hexadecimal digit into a register, then inserted that hexadecimal digit in the register into a specified position in the Random Access Memory (RAM).
Doing this means I could do all sorts of stuff - morph wild Pokémon into species which didn't exist, which I then caught and their cries appearing in the Pokédex often lasted over a minute and sounded hilarious. I could battle a trainer who manages to one-shot my entire team, I could overflow the stats of my Pokémon such that my Mew had 25565 attack, i could activate a walk through walls cheat, I could change the music tracks... the possibilities were practically endless. The only things I couldn't do involved having a script run automatically over and over - that needs access to the ROM (Read Only Memory, hence why you can't edit it).
If you want some amazing videos, here are some of my favourites. Beware though, if you watch any of these, you spend all night and all of the next day watching every single one that goes around. I've only scratched the surface of what's possible as well.
The ZZAZZ Glitch reprograms the game into Pong. (this guy's a wizard, a god among the community)
The same guy creates a "Creepypasta" save file.
Chickasaurus uses a glithched map and two linked emulators to catch a Mew in the most absurd circumstances.
These games are incredibly broken. If you want a new hobby for 5 months, try getting into it. It's hilarious.