Re: [stella] lsr HMCLR

Subject: Re: [stella] lsr HMCLR
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Tue, 9 Aug 2005 12:02:48 -0400
On Tue, 9 Aug 2005, Bob Montgomery wrote:

> In Stella and z26, will
>   lsr HMCLR
> *always* strobe HMCLR ($2B) and set the carry?
> Based on some testing, it seems to.

Well, sort-of. The LSR will read from $2B, which is a mirror of $0B,
aka INPT3 (connected to paddle 4). Only bit 7 of INPT3 is wired to
anything; the other bits "float". In both emulators, the disconnected
bits will read as the address being read from, so bits 0-6 will be $2B,
which has bit 0 set. The LSR will shift bit 0 into the Carry, setting it,
and write either $15 or $55 (depending on the state of bit 7 read from
INPT3) back to address $2B (aka HMCLR, when being written to).

This is an oversimplification of how a real 6507 behaves when reading
floating/disconnected bits, which happens to be accurate enough to run
the few games that depend on this behaviour...

> A little discussion over at AA (
> seems to indicate that this may not be reliable on real hardware,
> especially with things like the FB2, multi-cart selectors, etc.

Different stuff on the bus can affect the states of the disconnected bits.
I'm not a hardware guy, so I dunno what the exact effects should be... The
emulators assume nothing else is on the bus.

> But in the emulators, will it be consistent?

In the current versions of the emulators, it should be, yes. But we're
always trying to make the emulators more accurate, so it might change
in future versions...

Hope this helps (and I hope I got it right...)

Archives (includes files) at
Unsub & more at

Current Thread