6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 6:33 pm

All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sat Jun 11, 2016 12:58 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
AWJ wrote:
BigDumbDinosaur wrote:
Quote:
...and RMW instructions still write back the unmodified data during the cycle that's an I/O cycle in native mode...

Again, completely avoidable by proper use of VDA and VPA. The "false" data bus access during cycle 5 (8 bit accumulator) or 6 (16 bit accumulator) of any R-M-W operation is indicated by the expression VDA && VPA being false.

Yes, but in emulation mode it's a unique "false write cycle" rather than a "false read cycle". It's the only time ever that VDA is false but WR is true. So hardware that depends on the false write for some reason will work if WR overrides VDA, or if VDA isn't used at all (e.g. a 65802 dropped into a legacy 6502 board)

It's not a "false write cycle." WDC makes no guarantee as to what is on D0-D7 when VDA || VPA is false, which means your hardware should not be following RWB during such cycles in an instruction.

If you are designing a system around the '816 it is incumbent that you account for the MPU's characteristics. That means when VDA || VPA is false no chip selects should be asserted, as there is no guarantee as to what is present on A0-A15, or what is on D0-D7 when Ø2 is low, which is when D0-D7 becomes A16-A23. This can be especially important with I/O hardware accesses, which could trigger unintended behavior in some devices.

VDA and VPA qualify all bus cycles, as well as the control outputs E, MX and RWB. Ergo the state of RWB is meaningless when VDA || VPA is false. This applies regardless of which mode in which the '816 is being operated.

Have you read the 65C816 instruction operation table starting at page 38 in the data sheet? It explains all of this in considerable detail. The Caveats section on page 51 sheds additional light on how the '816 operates.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2016 1:45 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigDumbDinosaur wrote:
VDA and VPA qualify all bus cycles, as well as the control outputs E, MX [...]
Can you cite a reference for the E and MX part of this, BDD?

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2016 6:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
VDA and VPA qualify all bus cycles, as well as the control outputs E, MX [...]
Can you cite a reference for the E and MX part of this, BDD?

I can't specifically point to MX but I did observe back when I was first operating POC 1.0 in emulation mode that E was not constantly high, even though the top of the reset code was:

Code:
         sei                   ;IRQs off
         cld                   ;ensure binary mode
         sec                   ;ensure...
         xce                   ;emulation mode

   ...etc...

At first blush, it would seem that E should go high when XCE is executed and stay there. However, that wasn't the case and I surmised that E was not being driven during the intermediate bus cycles when VDA and VPA are both low. I further surmised that was probably the case as well for MX, which also has to be qualified by Ø2 and hence would have been difficult to observe with the test setup I had at the time.

So, this observation was casual in nature, as I had (still don't) no specific plans to use E and/or MX for anything. Also, around that time, my old Beckman scope was on its way out and the second channel had completely quit, so I didn't get around to comparing E's status with VDA and VPA. I was well on my way to getting POC V1.0 to run in native mode, so I didn't give it any more investigation.

I'm sure my statement is worthy of a challenge, but the more I work with the '816 the more I realize how important VDA/VPA qualification is to stable operation.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2016 7:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
My printouts above do show the E pin going from high to low after the CLC, XCE instructions.  I haven't tested for anything about the MX pin.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2016 5:26 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
BigDumbDinosaur later wrote:
I surmised that E was not being driven during the intermediate bus cycles when VDA and VPA are both low. [...] I didn't get around to comparing E's status with VDA and VPA.
@BDD -- thanks for clarifying. Turns out we agree the point you made about E and MX is challenge-worthy. The experiment to explore it remains incomplete, there's nothing in the datasheet to support it, and we agree it's an unlikely-seeming thing in the first place.

BigDumbDinosaur wrote:
I further surmised that was probably the case as well for MX, which also has to be qualified by Ø2 [...]
An easy mistake to make. (And I don't mind surmise when it's identified as such.) But datasheet timing diagram Figure 4-1 shows that neither E nor MX can be "qualified by Ø2" in the usual sense.

-- Jeff

[ Edits ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: