Re: [stella] Emulator vs. 6507

Subject: Re: [stella] Emulator vs. 6507
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Wed, 27 Jul 2005 15:04:47 -0400
> 1) Attempt to reset the 'B' flag,
> 2) If the attempt succeeds, you are running on an emulator,
> othewise you are running on hardware.
> This method is based on Eckhard's theory that the 'B' flag
> is directly wired to the IRQ pin, hence it cannot be
> controlled from software on a 'real' 6507.
> Any thoughts on this?

Assuming that Eckhard is right:

This will only work until someone writes/modifies an emulator so it
behaves the same way as a real 6507. If he's right, both Stella and z26
will likely be modified by their next releases.

It wouldn't be hard to write a ROM to test this on real hardware, either..
if I knew where my EPROM burner was, I'd probably have done this already.

> NOTE: I doubt the wisdom of writing games which check the
> running environment, but as an exercise in research it's not
> a bad project!

I doubt the wisdom of it too, and also the usefulness: if it's possible
to tell whether you're running in an emulator or the real thing, that
means that (by definition) you're taking advantage of an inaccuracy in
the emulation. Every emulator author's goal is to achieve the magical
100% perfect emulation, so whatever misbehaviour your code depends on
is likely to go away sometime in the future. Emulators (especially open
source ones) are constantly being improved, and I doubt anyone would
want it otherwise...

Archives (includes files) at
Unsub & more at

Current Thread