[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Steal RAM -- Question
"mmphosis" <markstock@mail.com> wrote in message
1162852073.373007.272600@h54g2000cwb.googlegroups.com">news:1162852073.373007.272600@h54g2000cwb.googlegroups.com...
> Greetings Nick,
>
> I appreciate you responding. And, you are right, STA ABS performs
> _one_ write. I checked out Understanding The Apple II, page 5-28.
> Okay, so now I know the source of this WRTCOUNT business.
>
> I said:
>
>> The STA instruction on a 6502 will access the memory location twice.
>
> Perhaps I need to say:
>
>> The STA instruction on a NMOS 6502 should access the memory location
>> twice.
>
> My use of the word "will" is too strong because I have no idea what is
> going to happen in the next five seconds. And, I am qualifying this
> with the "NMOS" 6502 because I don't know the behaviour of the store
> instruction for a CMOS 6502, WDC 65816, and other 6502 derivatives.
>
> I used the word access not write. In my experience, the store
> instruction on a NMOS 6502 makes two accesses to the memory location
> which can be important with memory-mapped IO. Also from what I read,
> there are some NMOS "Read-Modify-Write" instructions that read data,
> write unmodified data, then write modified data: inc, dec, asl, lsr,
> rol, ror. From reading the WDC Programming manual, with the CMOS
> chips, these instructions read data twice, then write modified data
> once which is different than what the NMOS implementation does. And,
> the 65816 behaves either way depending on whether it is in emulation or
> native mode.
>
> I found this question here:
> http://funkytroll.com/challenge/GDC2001.txt
>
> Which of the following instructions will cause the Apple ]['s speaker
> to make the softest possible click?
> *a STA $C030
> -b LDA $C030
> -c BIT $C031
> -d MOV EAX, DWORD PTR ds:[0C030h]
>
> If I am wrong about the "the 6502 store instruction doing two access to
> memory", then explain why the answer to this question is *a.
You are talking about strobe. CMOS 6502 does not exist. It is only
NMOS 6502 when CMOS 65C02 adopts all 6502 instructions for compability
reason. You may notice the number of strobes (1 to 4) on NMOS 6502 and
strobes (1 to 3) on CMOS 65C02. You perform speaker using LDA xxxx,Y that
takes 4 strobes on NMOS 6502, but it is only 3 strobes on CMOS 65C02. It is
what Understanding the Apple //e's manual explains the difference of 6502
and 65C02 in Chapter 4 and Chapter C. Please note that I don't remember
exactly how many strobes per instruction and I am unable to confirm it if I
am correct. Please refer to Chapter 4 and Chapter C.
It is the first topic we have discussed 16KB RAM's switches. It is so
forth good, but second topic is never answered. I realize that none is
familiar to this second topic. Second topic is to discuss how peripheral
card can steal RAM. I mean that it has an ability to block MMU chip from
accessing data to/from motherboard RAM and auxiliary RAM so they are through
peripheral card RAM. It is done to force INHIBIT' LOW before it causes
CASEN' (motherboard RAM) and EN80' (auxiliary RAM) to be HIGH. Then low RAM
($0000-$BFFF) and high RAM ($D000-$FFFF) are accessed through peripheral
card ROM like AE RAMFactor card. Do you know what I am talking about?
Bryan Parkoff