Emulation issues and roadblocks: Difference between revisions

Ahayri (talk | contribs)
Rtim (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by one other user not shown)
Line 8: Line 8:
:There are several systems that require more attention from the emulation community. While multiple emulators may exist, none of them appear particularly promising. These systems for which a PC cannot yet fully replicate the experience, because emulators are incomplete, or lack support for key hardware features, peripherals, or specialized components. As a result, certain software or functions remain usable only on original hardware.
:There are several systems that require more attention from the emulation community. While multiple emulators may exist, none of them appear particularly promising. These systems for which a PC cannot yet fully replicate the experience, because emulators are incomplete, or lack support for key hardware features, peripherals, or specialized components. As a result, certain software or functions remain usable only on original hardware.
*[[Gizmondo emulators|Gizmondo]]
*[[Gizmondo emulators|Gizmondo]]
*[[IPod Classic emulators|Apple iPod]]
*[[IPod emulators|Apple iPod]]
*[[IOS_emulators|Apple iOS]]
*[[IOS_emulators|Apple iOS]]
*[[PlayStation Mobile]]
*[[PlayStation Mobile]]
Line 39: Line 39:
Instead, modern PC emulation generally relies on either [[wikipedia:Hardware_virtualization#Hardware-assisted_virtualization|hardware-assisted virtualization]] (such as [[Hypervisors#Type 1 hypervisors|KVM]] or [[Hypervisors#Hyper-V Subsets|WHPX]]) or [[High and low-level emulation#Modern Dependencies.2C Advancements and Optimization Strategies|dynamic binary translation]] (DBT). Hardware-assisted virtualization executes guest code directly on the host processor and therefore [[Hypervisors#Performance impact|provides substantially higher CPU performance]], but requires compatible host hardware and introduces a dependency on the host operating system's virtualization facilities. Generic dynamic binary translation engines such as QEMU's TCG/MTTCG provide a flexible software-only foundation but generally do not deliver sufficient performance in their standard form. Nevertheless, projects such as [[Xemu]], [[RPCS3]] and [[Cemu]] demonstrate that carefully optimized, workload-specific dynamic recompilers can achieve practical performance even for systems that very complex.
Instead, modern PC emulation generally relies on either [[wikipedia:Hardware_virtualization#Hardware-assisted_virtualization|hardware-assisted virtualization]] (such as [[Hypervisors#Type 1 hypervisors|KVM]] or [[Hypervisors#Hyper-V Subsets|WHPX]]) or [[High and low-level emulation#Modern Dependencies.2C Advancements and Optimization Strategies|dynamic binary translation]] (DBT). Hardware-assisted virtualization executes guest code directly on the host processor and therefore [[Hypervisors#Performance impact|provides substantially higher CPU performance]], but requires compatible host hardware and introduces a dependency on the host operating system's virtualization facilities. Generic dynamic binary translation engines such as QEMU's TCG/MTTCG provide a flexible software-only foundation but generally do not deliver sufficient performance in their standard form. Nevertheless, projects such as [[Xemu]], [[RPCS3]] and [[Cemu]] demonstrate that carefully optimized, workload-specific dynamic recompilers can achieve practical performance even for systems that very complex.


Unlike console emulators, Windows XP emulation targets the same general x86 instruction set used by modern desktop processors. Although privilege levels, segmentation, paging, exceptions, self-modifying code and other architectural differences still require translation, guest instructions can often be mapped to relatively efficient native host code. Rather than attempting cycle-accurate execution, a specialized recompiler could instead optimize frequently executed code paths through techniques such as larger translation blocks, aggressive block linking, profile-guided optimization and guest operating system-aware fast paths. The performance target is also substantially lower than native execution on modern processors: many games and applications released during this period were designed to run on hardware comparable to a 32-bit Intel Pentium 4 "Prescott" CPU with SSE3 support.<ref>While the Prescott microarchitecture was designed with Intel 64 capabilities, the initial desktop models shipped with 64-bit support disabled. Consequently, these early variants do not qualify as x86-64-v1 processors and function strictly as 32-bit x86 processors with SSE3 support. Intel later enabled 64-bit support in subsequent Prescott revisions, such as the 5xxF and 6xx series.</ref> Consequently, a software emulator does not need to approach native modern CPU performance; it merely needs to match the performance of legacy hardware while minimizing translation overhead. The most significant remaining technical hurdle for the 2001–2006 era is efficient 3D graphics acceleration; a DirectX 9.0c Shader Model 3.0 GPU would be the perfect target to run the vast majority of software from this generation. While projects such as [[Windows NT 5.x emulators#Other solutions|QEMU 3dfx]] demonstrate that application-level API pass-through is feasible, these solutions typically rely on guest-side wrapper libraries, manual configuration, and external translation layers. Other projects including [https://github.com/JHRobotics/softgpu SoftGPU], [https://github.com/iXit/wine-nine-standalone Gallium Nine], and experimental [https://github.com/virtio-win/kvm-guest-drivers-windows/pull/943 virtio-gpu] implementations explore different approaches to accelerating legacy graphics APIs. A fully integrated software emulator combining a high-performance dynamic recompiler with a paravirtualized graphics architecture remains an area of active research rather than an established solution.
But unlike a typical console emulator, a Windows XP emulator could target the same general x86 instruction set used by modern desktop processors. Although privilege levels, segmentation, paging, exceptions, self-modifying code and other architectural differences still require translation, guest instructions can often be mapped to relatively efficient native host code. Rather than attempting cycle-accurate execution, a specialized recompiler could instead optimize frequently executed code paths through techniques such as larger translation blocks, aggressive block linking, profile-guided optimization and guest operating system-aware fast paths. The performance target is substantially lower than native execution on modern processors; many games and applications released during this period were designed to run on hardware comparable to a 32-bit Intel Pentium 4 "Prescott" CPU with SSE3 support.<ref>While the Prescott microarchitecture was designed with Intel 64 capabilities, the initial desktop models shipped with 64-bit support disabled. Consequently, these early variants do not qualify as x86-64-v1 processors and function strictly as 32-bit x86 processors with SSE3 support. Intel later enabled 64-bit support in subsequent Prescott revisions, such as the 5xxF and 6xx series.</ref> Consequently, the software emulator only needs to match this legacy performance while minimizing translation overhead. The most significant remaining technical hurdle for the 2001–2006 era is efficient 3D graphics acceleration; a DirectX 9.0c Shader Model 3.0 GPU would be the perfect target to run the vast majority of software from this generation. While projects such as [[Windows NT 5.x emulators#Other solutions|QEMU 3dfx]] demonstrate that application-level API pass-through is feasible, these solutions typically rely on guest-side wrapper libraries, manual configuration, and external translation layers. Other projects including [https://github.com/JHRobotics/softgpu SoftGPU], [https://github.com/iXit/wine-nine-standalone Gallium Nine], and experimental [https://github.com/virtio-win/kvm-guest-drivers-windows/pull/943 virtio-gpu] implementations explore different approaches to accelerating legacy graphics APIs. A fully integrated software emulator combining a high-performance dynamic recompiler with a paravirtualized graphics architecture remains an area of active research rather than an established solution.


=== Approach 1: User-Space API Pass-Through ===
=== Approach 1: User-Space API Pass-Through ===
Line 175: Line 175:
* [[Compatibility layers]]
* [[Compatibility layers]]
* [[Windows NT 5.x emulators#Hypervisors|Hypervisor's Virtual GPU Adapters for legacy operating systems]]
* [[Windows NT 5.x emulators#Hypervisors|Hypervisor's Virtual GPU Adapters for legacy operating systems]]
* [https://github.com/libcdio/libcdio libcdio], [https://github.com/polpo/picogus picogus], Duckstation's [https://github.com/stenzek/duckstation/blob/master/src/util/cd_image_ccd.cpp cd image ccd], [https://github.com/stenzek/duckstation/blob/master/src/util/cd_image_cue.cpp cd image cue], [[Ymir]]'s [https://github.com/StrikerX3/Ymir/tree/main/libs/ymir-core/src/ymir/hw/cdblock low-level cd block] and [https://github.com/PCSX2/pcsx2/tree/master/pcsx2/CDVD PCSX2's CDVD] - Could be beneficial for implementing reading capability for [[Ripping games#Disc-based|capable disc image formats]].
* [https://github.com/libcdio/libcdio libcdio], [https://github.com/polpo/picogus picogus], Duckstation's [https://github.com/stenzek/duckstation/blob/master/src/util/cd_image_ccd.cpp cd image ccd], [https://github.com/stenzek/duckstation/blob/master/src/util/cd_image_cue.cpp cd image cue], [[86Box]]' [https://github.com/86Box/86Box/pull/7424 aaru support], [[Ymir]]'s [https://github.com/StrikerX3/Ymir/tree/main/libs/ymir-core/src/ymir/hw/cdblock low-level cd block] and [https://github.com/PCSX2/pcsx2/tree/master/pcsx2/CDVD PCSX2's CDVD] - Could be beneficial for implementing reading capability for [[Ripping games#Disc-based|capable disc image formats]].
* [https://github.com/aaronsgiles/ymfm ymfm]
* [https://github.com/aaronsgiles/ymfm ymfm]


Line 319: Line 319:
** '''IEEE 1394 (i.LINK):''' Early PlayStation 2 models included an IEEE 1394 interface intended primarily for multiplayer connectivity. Only a small number of commercial titles utilized the port, making it a relatively low priority for emulator development compared to other subsystems.
** '''IEEE 1394 (i.LINK):''' Early PlayStation 2 models included an IEEE 1394 interface intended primarily for multiplayer connectivity. Only a small number of commercial titles utilized the port, making it a relatively low priority for emulator development compared to other subsystems.
** '''[https://www.psdevwiki.com/ps2/DEV9C DEV9C]:''' The expansion interface controller responsible for the network adapter and hard disk drive (HDD) systems. Emulating its sub-registers is documented extensively across historical progress reports.<ref>https://pcsx2.net/blog/2025/pcsx2-2.4_2.2/#dev9-fixes</ref><ref>https://pcsx2.net/blog/2023/q1-2022-progress-report#dev9</ref>
** '''[https://www.psdevwiki.com/ps2/DEV9C DEV9C]:''' The expansion interface controller responsible for the network adapter and hard disk drive (HDD) systems. Emulating its sub-registers is documented extensively across historical progress reports.<ref>https://pcsx2.net/blog/2025/pcsx2-2.4_2.2/#dev9-fixes</ref><ref>https://pcsx2.net/blog/2023/q1-2022-progress-report#dev9</ref>
** '''CDVD:''' The PlayStation 2's CD/DVD subsystem is responsible for reading game data from optical media and exposing it to software through the I/O Processor (IOP). The CDVD hardware works alongside several system modules such as `CDVDMAN` and `CDVDFSV`, allowing games to access files, stream assets, and read disc metadata. While optical drive emulation is generally considered a more mature area of PlayStation 2 emulation than the Emotion Engine, Vector Units, or Graphics Synthesizer, accurate CDVD behavior remains important for compatibility. Some titles continuously stream data from disc during gameplay, requiring the emulator to provide data at rates and timings consistent with software expectations. Improper handling of disc reads can lead to loading issues, audio synchronization problems, or streaming-related bugs in affected titles. The PlayStation 2 supported multiple media formats, including CD-ROM, DVD-5, and DVD-9 discs. Internally, PCSX2 emulates the system software interfaces used by games to communicate with the CDVD hardware rather than attempting to model every physical characteristic of the optical drive at a mechanical level. Modern versions generally provide highly compatible CD/DVD emulation, and CDVD behavior is no longer considered one of the primary obstacles to PlayStation 2 emulation.
** '''[[Disc_Drive_emulation#DVD|CDVD]]:''' The PlayStation 2's CD/DVD subsystem is responsible for reading game data from optical media and exposing it to software through the I/O Processor (IOP). The CDVD hardware works alongside several system modules such as `CDVDMAN` and `CDVDFSV`, allowing games to access files, stream assets, and read disc metadata. While optical drive emulation is generally considered a more mature area of PlayStation 2 emulation than the Emotion Engine, Vector Units, or Graphics Synthesizer, accurate CDVD behavior remains important for compatibility. Some titles continuously stream data from disc during gameplay, requiring the emulator to provide data at rates and timings consistent with software expectations. Improper handling of disc reads can lead to loading issues, audio synchronization problems, or streaming-related bugs in affected titles. The PlayStation 2 supported multiple media formats, including CD-ROM, DVD-5, and DVD-9 discs. Internally, PCSX2 emulates the system software interfaces used by games to communicate with the CDVD hardware rather than attempting to model every physical characteristic of the optical drive at a mechanical level. Modern versions generally provide highly compatible CD/DVD emulation, and CDVD behavior is no longer considered one of the primary obstacles to PlayStation 2 emulation.


::{| class="wikitable"
::{| class="wikitable"
Line 345: Line 345:
* '''System Controllers & Security'''
* '''System Controllers & Security'''
** '''MechaCon:''' A dedicated security microcontroller responsible for console authentication, boot security, optical disc authentication, and coordinating security features such as '''MagicGate''' memory card authentication and KELF decryption. Because portions of its operation rely on proprietary cryptographic material, complete emulation presents unique legal and technical challenges.<ref>https://github.com/PCSX2/pcsx2/pull/4274#issuecomment-795316629</ref><ref>https://github.com/PCSX2/pcsx2/pull/10836#issuecomment-1954866179</ref>
** '''MechaCon:''' A dedicated security microcontroller responsible for console authentication, boot security, optical disc authentication, and coordinating security features such as '''MagicGate''' memory card authentication and KELF decryption. Because portions of its operation rely on proprietary cryptographic material, complete emulation presents unique legal and technical challenges.<ref>https://github.com/PCSX2/pcsx2/pull/4274#issuecomment-795316629</ref><ref>https://github.com/PCSX2/pcsx2/pull/10836#issuecomment-1954866179</ref>
** '''MagicGate:''' Sony's authentication and encryption technology used primarily by PlayStation 2 memory cards. Community projects have implemented varying degrees of MagicGate support, although these generally require user-supplied cryptographic material dumped from original hardware. See the [[#DVD player]] and [[#Arcade hardware variants|Konami Python 2]] sections.
** '''MagicGate:''' Sony's authentication and encryption technology used primarily by PlayStation 2 memory cards. Community projects have implemented varying degrees of MagicGate support, although these generally require user-supplied cryptographic material dumped from original hardware. See the [[Disc_Drive_emulation#DVD|PS2's DVD player]] and [[PlayStation_2_emulators#Arcade hardware variants|Konami Python 2]] sections.
** '''Syscon:''' A dedicated system controller responsible for power management, the real-time clock, thermal monitoring, and coordinating system startup and shutdown. Most commercial software interacts with Syscon only indirectly through the BIOS.
** '''Syscon:''' A dedicated system controller responsible for power management, the real-time clock, thermal monitoring, and coordinating system startup and shutdown. Most commercial software interacts with Syscon only indirectly through the BIOS.