I think it is fair to say there is no single test to determine if your code is running under emulation. You can look for tell-tale resources to determine if your code is running under OS4, MorphOS and UAE, but even if you don't find any of those, there's no guarantee you aren't in an emulation of some description. After all, the "perfect" emulator should be totally indistinguishable from the real thing as far as any userland code is concerned.