Theres a linedef trigger that allows the game to check if the player has all the emeralds.
I believe both
The Mystic Realm (In AGZ3) and
Emerald Quest (In the Hub world, it checks to see if you have the emeralds in the final stage of the game) have these triggers. So if you don't get a response you can take a look at the stages with Zone Builder!