Re: [hatari-devel] Emulation on separate CPU cores

[ Thread Index | Date Index | More Archives ]

On Sun, 4 Dec 2022 at 11:20, Thorsten Otto <admin@xxxxxxxxxxx> wrote:

I agree with Eero. Also he probably doesn't have the problem to be cycle exact, since are no programs for Jaguar that depend on any hardware tricks which rely on that.

I wouldn't be so sure about this. From his Patreon article:

The Jaguar is in a uniquely magical/terrifying place, where we have some reasonably powerful chips and components operating in true parallel, but we also still require a high degree of cycle accuracy if we hope to maintain any kind of stability with the software.


There was one fun case where the software had written a test to see if the Blitter was finished with an operation, and if we hit that code while the Blitter was indeed running, instead of spinning while reading the Blitter status, the code would jump back to the instruction after the read and just spin there checking an unchanging register forever! This means that through a miracle of timing, on real hardware, we were just never managing to get to this point in code while the Blitter was operating, even though the developer had gone out of their way to expect and handle such a case. They handled it in a way that would explode if it were ever put to the test, and my emulator put it to the test! This was the nature of most of the bugs I encountered in the final stretch, incredibly delicate timing scenarios.

To me it looks like there's a fair amount of cycle accuracy emulated. That guy is really good, so I wouldn't dismiss his achievement simply as "nah, surely his emulator isn't that accurate and that's why it's so fast".


Mail converted by MHonArc 2.6.19+