I don't know about the older generation so I'll explain how PS4 emulation can be achieve. The first step is to understand how the console run the game. The good news is the PS4 has been hacked and almost all of its file and information has been decrypted and dumped. The official PS4 SDK also leaked.
Now we know how the console run the game. The next step is how to use this information run the game outside the console. The good news is PS4 system is just a modified version of FreeBSD, which mean how it works is very similar to the PC. A PS4 executable is just a custom ELF file. So to run a PS4 game outside the console we need to manually map the game executable and provide the symbol it needed somehow (e.g. a custom implementation or reuse the PS4 library).
Exactly. I will make explain more how PS4 emulator can be achieve.
First, you can make the whole universe. You need a universe for PS4 to live in.
Then, you make do PS4 emulator.
Now you have achieve.
Now we know how the console run the game. The next step is how to use this information run the game outside the console. The good news is PS4 system is just a modified version of FreeBSD, which mean how it works is very similar to the PC. A PS4 executable is just a custom ELF file. So to run a PS4 game outside the console we need to manually map the game executable and provide the symbol it needed somehow (e.g. a custom implementation or reuse the PS4 library).