system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do we have to emulate old consoles? Why can't we instead write a translator that will transform, for example, old NES game code to new X86 CPU?

Why? What are the technical limitations? The NES vs X86 is just an example, but let's say we can "fill out the blanks" like GPU emulation, etc, then why? Were there any attempts like that for software emulation?

I mean, why can't we write a one-time translator that converts NES rom to Windows Exe (for example)? Wouldn't it be better than using "runtime emulators" and virtual machines?
gpt
In theory this is possible. What you're describing is essentially decompiling software compiled for one architecture, and recompiling it for a different architecture.

The main issue here is that writing such a "recompiler" is extremely hard. Decompiling is already a pretty shaky process that often results in very questionable source code that is near impossible to understand (despite being technically "human readable") and sometimes has a few unexpected errors when recompiled as the computer starts to get confused working with this pretty washed code. Trying to then adapt this code to new architectures and trying to guess what each code maps to is not a trivial task at all. 

In some cases you'd simply collide with modern architectures not allowing things that older architectures did. Certain games on older consoles did a lot of *really* shaky things for optimization sake, like writing and reading from "off-limit" memory to increase their own memory space or relying on very specific hardware quirks (not architecture quirks, quirks in the literal hardware) that are either impossible to do or will get a resounding "no, forbidden" from the target OS.