![]() ![]() The SNES contains two oscillators: a crystal clock that runs at ~21MHz, which controls the CPU and PPUs and a ceramic resonator that runs at ~24MHz, which controls the SMP and DSP. We create tests that try to detect what happens on edge cases, then confirm that our emulation behaves identically to a real SNES. Multiplication is a fairly trivial operation, but this is the general process behind reverse engineering, and it extends to more complex operations such as how the SNES' horizontal blanking DMA (direct memory access) transfers work. Otherwise we'd have tests that would never complete. In cases like this, we would have to get more selective with our tests and try to determine exactly when flags might change, when results might overflow, and so forth. If the CPU had 32-bit x 32-bit multiplications, it wouldn’t be practical to test all combinations of inputs before the heat death of the universe (with current technology, at least). Testing every possible value would generate 4 billion results, which is starting to push what is practical to test in a reasonable amount of time. Now let's say the CPU had 16-bit x 16-bit multiplications. Then we could modify our emulators so, when running the same test, we produce exactly the same tables at the same times. Let's start by taking a look at the components that make up the SNES:īy analyzing these tables, we could determine exactly how and when the CPU results were set certain ways. If you're still intrigued, read on for a deep dive into the background of the problem and my proposed solutions. No stone was left unturned, no area left unfinished. I want this final piece solved so that I can feel confident in my retirement that the SNES has been faithfully and completely preserved through emulation. I'm getting older, and I won't be around forever. I can tell you why this is important to me: it's my life's work, and I don't want to have to say I came this close to finishing without getting the last piece of it right. As with any goal in life, the closer we get to perfection, the smaller the returns. If you're not interested in the pursuit of one hundred percent faithful emulation perfection for its own sake, I am not going to be able to convince you of the need for improving SNES PPU emulation further. ![]() The remaining issues are relatively small ones, in the grand scheme of things. We mostly know how the PPUs work, but we have to make guesses for some functionality that result in less than total perfection. The sole exception is the PPUs (picture processing units), which are used to generate the video frames sent to your screen. Today, we enjoy cycle-level accuracy for nearly every component of the SNES. So that's it, right? Kudos on a job well done, thanks for all the fish? Well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |