Re: C64 Expansion Port IO1 and IO2 and PEEK and POKE

From: A. Fachat <afachat_at_gmx.de>
Date: Mon, 09 May 2016 22:22:09 +0200
Message-ID: <154972f2168.279a.b4d1f2b66006003a6acd9b1a7b71c3b1@gmx.de>
A dummy read occurs when the processor still needs to calculate some 
addresses or data before it can be written. For example, if the addressing 
mode abs,x crosses a page boundary, it first does a dummy read on an 
address where the low address byte is added to, but the high address byte 
is not yet incremented. So if you read from $00f0,x with x equals $12, 
there first is a dummy read from $0002, and then the actual valid transfer 
(read or write) on $0102.
With the indirect indexed addressing mode (zp),y it is similar. The dummy 
read goes to the address stored in zp with the low byte increased by the 
value of Y, but the high byte not yet incremented.

André


Am 9. Mai 2016 21:58:17 schrieb Leif Bloomquist <leif@schemafactor.com>:

> Thanks.  This is a new topic for me - what's a dummy read?  Something
> that happens when doing an STA on a referenced address?
>
> The VICE monitor has come a long way since I last used it!   Usually
> on real hardware.  :-P
>
> -Leif
>
>
> --
> Leif Bloomquist | leif@schemafactor.com | +1 416-737-2328 | Check out
> my blog! http://www.jammingsignal.com
>
> "Every choice, no matter how small, begins a new story." - xkcd
>
>
> On Mon, May 9, 2016 at 1:51 PM, Kajtár Zsolt <soci@c64.rulez.org> wrote:
>>> you can use VICE to examine what happens:
>>>
>>> go to monitor and put a tracepoint on $df00:
>>>
>>> (C:$e5cf) trace df00
>>> TRACE: 2  C:$df00  (Trace load store)
>>> (C:$e5cf) x
>>>
>>> ...leave monitor, do poke 57088,123 and enter the monitor again, you see this:
>>>
>>> #2 (Trace  load df00)  213 049
>>> .C:b82a  91 14       STA ($14),Y    - A:37 X:37 Y:00 SP:f9 ..-...ZC   82195204
>>> #2 (Trace store df00)  213 049
>>> .C:b82a  91 14       STA ($14),Y    - A:37 X:37 Y:00 SP:f9 ..-...ZC   82195204
>>>
>>> so, what you are seeing is the dummy load that happens before the actual store
>>> :)
>>
>> Apart from the wrong cycle numbers it's just the regular dummy read for fixing
>> up the high part of address after indexing. It's expected as it's not optional
>> for a write.
>>
>> --
>>                                                     -soci-
>>
>
>        Message was sent through the cbm-hackers mailing list



       Message was sent through the cbm-hackers mailing list
Received on 2016-05-09 21:00:10

Archive generated by hypermail 2.2.0.