[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Steal RAM -- Question



> And you are right, rather than CMOS 6502, instead I need to say 65C02.

When Michael said 65(C)02 he was referring to both CPU's. The only
difference even slightly pertaining to our discussion is that in a
65C02, read-modify-write instructions like ASL etc do not perform the
second superfluous write that they did in the NMOS 6502. (This write is
replaced with a read.)

> In my experience:
>     LDA $C030 ; toggles the speaker once
>     STA $C030 ; toggles the speaker twice! (very quickly) using a 6502.

How have you verified this? I suspect you haven't, or we wouldn't be
having this discussion. Sather analysed _every_ instruction with
scopes, and documented it on pages 4-20 to 4-23 of Understanding the
Apple II. For the 65C02 you should read page 4-26 of Understanding the
Apple IIe.

Perhaps the origin of this misunderstanding is this:
"You should always use a read operation to toggle the speaker. If you
write to this soft switch, it switches twice in rapid succession. The
resulting pulse is so short that the speaker doesn't have time to
respond; it doesn't make a sound."
>From the Apple IIe Technical Reference Manual (1985), page 37.

The above statement is very misleading as it applies only to using the
POKE command, yet it doesn't make this clear.

> ; I tested this with KEGSMAC v0.85 and the sound is not quieter.
> 305:8D
> 300G

Good, I'm glad to hear that Kegs is implemented correctly.

> ; in this patched version the sound will be quiet
> 305:AD 30 C0 AD 30 C0
> 300G

Fair enough.

> And, our discussion is an example of why the Wikipedia concept does
> works.  ;-)  If Einstein got it wrong, who is going to question him?

I would tend agree - in the long term. Please verify your sources.
Sather should be all you need, especially page 4-20. You might also
want to visit Michael's website and marvel at his accomplishments in
Apple II sound.

Cheers,
Nick.