You can get to high genrations by stuff like debugging and stuff but, I do not think it is possible to do it from scratch because the battery would have to last like 3 years. Which is not really possible on tamagotchi, as they do not last that long.
*Tamagotchi Song*