Changes

Jump to navigation Jump to search

Emulation accuracy

3 bytes removed, 14:26, 24 August 2018
grammar
An emulator isn't accurate when it has a large amount of visual and audio glitches and favors performance as much as possible. To work around these glitches, emulator developers typically include game-specific hacks (and prioritize popular games) to skip over problems, such as compatibility issues that can cause games to break. Many times, these emulators will be deemed incompatible with the less popular games. As byuu explains in a 2011 Ars Technica article linked below, "Speedy Gonzales: Los Gatos Bandidos" will soft-lock towards the end due to a specific hardware edge case that isn't emulated in [[ZSNES]] or [[Snes9x]], but is properly dealt with in his own emulator [[higan]] due to his documentation of the system. This can also become very problematic when ROM hacks abuse software errors to create otherwise impossible behaviors to achieve what they can. When a ROM hack can only be used in that one specific emulator, he explains, it becomes incompatible with real hardware (either through a flash cart or printed), and that such an issue has occurred with [[ZSNES]] before and continues to occur with Nintendo 64 ROM hacks.
Newer emulators tend to favor High -Level Emulation (HLE) as opposed to Low -Level Emulation (LLE), which results in lower accuracy. While emulators like [[Dolphin]] favor accuracy but still retain HLE for performance and have successfully used it to an advantage, these types of exceptions are uncommon and [[High/Low level emulation|it can still hinder accuracy]].
===Medium accuracy===
Most emulators headed by multiple developers tend to have fewer glitches, but still , have many problems.
===High accuracy===
Emulator developers often strive for high accuracy when the system cannot effectively be cycle accurate. Their emulator replicates the components of the original system as closely as possible, and as byuu explains it's that reason that more processing power is required to do so. The result is fewer less audio and visual glitches, and better handling of edge cases used by creative game programmers. An emulator with high accuracy may or may not be cycle-accurate and sometimes, they achieve 100% compatibility with commercially released games.
===Cycle accuracy===
Emulating components according to their per-cycle accesses results in cycle-accurate emulation. Each individual component is emulated and mutually synchronised synchronized at single-clock resolution, which has a higher CPU cost. The speed of the emulation depends on the way cycle-accuracy is implemented, and it doesn't necessarily mean 100% accuracy. Even [[higan]] still has issues with the ROM Hack "Mario and Luigi: Kola Kingdom Quest," where it doesn't emulate the text glitch of the level's title.
===Subcycle accuracy===
The heartbeat of an IC is its clock signal; a full cycle of the clock signal involves two transitions: from low to high and then back from high to low. Therefore even a chip that is fully synchronised synchronized to its clock may not be emulated accurately if it is emulated with only cycle precision as it'll have to bundle together both its rising and falling actions.
The [[wikipedia:Zilog_Z80|Z80]] processor offers an example of this: almost all inputs are sampled on a rising clock but the WAIT signal is sampled on a falling clock. E.g. in a standard three-clock-cycle memory access machine cycle the WAIT line is sampled on the final falling clock — 0.5 cycles before the end of the machine cycle. If the Z80 is required to wait, it will sample the WAIT line again at cycle intervals until it spots that it is no longer asserted and complete 0.5 cycles after that. Therefore an emulator that is only cycle accurate cycles accurately will have to sample it either 0.5 cycles early or 0.5 cycles late, and will stop waiting either 0.5 cycles early or 0.5 cycles late, causing a phase error with whatever it was sampling.
Worse than that, as the Z80 tests WAIT only once every machine cycle, not every clock cycle, missing it as a result of sampling at the wrong time can cause a net error of four or more cycles.
Using the broad brush of cycle accuracy can also cause problems in machines with multiple clock signals — component A being accurate only to the complete clock cycle can leave it as observably inaccurate if component B is running with a quicker clock. A simple example of this can be found in the BBC Micro, where the 6522 timer chips run at 1Mhz while the CPU runs at 2Mhz. 6522s generate an interrupt half a cycle after they underflow. Therefore if the 6522s in a BBC Micro are emulated only in whole-cycle steps, they will observably trigger interrupts a cycle late from the point of view of the CPU. In practice , this can cause some copy protection mechanisms to fail.
Impinging upon chip accuracy, some chips, such as the Commodore 64's [[wikipedia:MOS_Technology_SID|SID]] are part digital and part analogueanalog. The analogue analog part can be emulated in a discrete fashion, but it is often desirable to take those discrete steps at a multiple of the clock rate. However the difference is usually not observable to other components in the emulated machine so although this is subcycle accuracy as some part of the state of the chip is known at as a precision of greater than one cycle, it doesn't tend to affect the design of the emulator as a whole.
===Chip accuracy===
The ones that favor accuracy explain their view for an entirely different reason; archival. Emulator projects should ultimately strive to recreate the hardware as much as possible; that's the only way for it to be compatible, and that's the only way to preserve the hardware. Speed and scalability to most devices is a lower priority to accuracy to the real console, both for purposes of compatibility and preservation.
Even within the second side, however, there is some disagreement as to just how much accuracy is actually needed. On most platforms, after obtaining a certain amount of accuracy, going further requires an exponential growth in system requirements, the results of which may not be noticeable to the vast majority of users. Cycle accuracy , in particular , has been hotly debated in regards to its usefulness, due to how such an extreme level of accuracy requires a lot of extra processing power for relatively few gains in compatibility.
Simply put, it's a disagreement between wanting 'good enough', 'good for all cases', and 'good for the future'.
1,809
edits

Navigation menu