Some chips are well documented and some actually get decapped. There are cases where retro console cores really can be the same logic as the original. It's a lofty goal and we're certainly not there currently. Often software emulation is content to mimic the inputs and outputs and complete the task as observed. There can (and often are) strange corner cases or subtleties that are difficult to catch. Is it a big deal? Not usually, but it's an interesting challenge to pursue a perfect logical re-implementation that can survive longer than we will.
https://www.retrorgb.com/furrtek-maps-the-pc-engine-huc6270-...