Got it, thanks. Here's what the Emerald code says. It's also why "shiny and nothing else changes" is hard.
In Emerald, shiny isn't stored as a yes/no anywhere. The game works it out every time:
(TID xor SID xor top half of the personality value xor bottom half) < 8
That's GET_SHINY_VALUE and SHIN...