https://github.com/pret/pokered
This is a GitHub repository containing the source code of Pokémon Red and Blue, disassembled and refactored to human-readable (and editable!) asm.
While the code is refactored, its functionality is untouched, and the ROMs you built with this code will be identical to the one that is on US Pokémon Red or Blue cartridge.
It is a really cool and interesting project!
@Siphonay There's one of crystal too! I don't know if there's one of gold and silver, but probably.