Unless you can get your hands on all of the documentation on the design of all the 'custom' chips, its virtually impossible to achieve 100% compatibility. There's always the chance some piece of software exploits an undocumented feature or the like which ends up breaking the emulator. They come close though.