Which is why I earlier mentioned driving it through an RC parallel filter, so that the CPU can independently pull it low without conflict, but the response to driving it low externally is still sufficiently fast. However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
More sophisticated solutions are possible, but for your first build it probably doesn't really matter what you do here.
65xx continuously variable clock
-
backspace119
- Posts: 346
- Joined: 25 Jan 2019
- Location: Knoxville, TN
Re: 65xx continuously variable clock
Chromatix wrote:
Which is why I earlier mentioned driving it through an RC parallel filter, so that the CPU can independently pull it low without conflict, but the response to driving it low externally is still sufficiently fast. However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
More sophisticated solutions are possible, but for your first build it probably doesn't really matter what you do here.
More sophisticated solutions are possible, but for your first build it probably doesn't really matter what you do here.
Knowing this, I suppose that what I have is fine (I routed what I was showing earlier, with a few changes to other parts of the schematic)
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65xx continuously variable clock
backspace119 wrote:
Chromatix wrote:
However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
-
backspace119
- Posts: 346
- Joined: 25 Jan 2019
- Location: Knoxville, TN
Re: 65xx continuously variable clock
GARTHWILSON wrote:
backspace119 wrote:
Chromatix wrote:
However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
So the CPU should be able to pull it low if the gate is still holding it high?
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65xx continuously variable clock
backspace119 wrote:
So the CPU should be able to pull it low if the gate is still holding it high?
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9429
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65xx continuously variable clock
backspace119 wrote:
As for the RDY pin, let me take a stab here, if the CPU starts a WAI command it's going to pass that signal into my circuit for OE and WE, which will in turn cause chips to possibly put garbage on the bus, and maybe bus contention too, am I correct?
The problem with using RDY to indicate to the read/write logic that a wait-state is in progress is that it might not be a wait-state that has negated RDY.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65xx continuously variable clock
Chromatix wrote:
However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
Worrying about the effect of unwanted WAI instructions is another thing which is just a distraction for a first build. All you need to be sure of is that a WAI won't damage your CPU. It's almost worth someone doing a soak test with RDY tied high and then using WAI and seeing if anything untoward happens. And perhaps measuring the current into RDY.
A beginner project should not need RDY and should not use WAI, which then keeps things simple.
But none of this is about a continuously variable clock...
Re: 65xx continuously variable clock
BigEd wrote:
A beginner project should not need RDY [...] which then keeps things simple.
The other part of the challenge is providing coherent information, because lack of same can (and I'm not exaggerating or being funny) be more of a problem than the problem itself! In a recently created thread I took a stab at organizing a collection of info, and if anyone has anything to add, please let me know or simply make a post in the thread: RDY vs CLOCK STRETCHING. Includes 2 very simple circuits
Just tonight I made some changes myself.... including, you'll be glad to hear, Ed, a tempering comment for novices and a bypass strategy which, during troubleshooting, can rule out Clock Stretching as a point of failure.
Chromatix wrote:
However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: 65xx continuously variable clock
The text seems to suggest that it'll simply continue execution after the WAI instruction, as if an interrupt arrived with interrupts masked, with RDY only pulled low for about one cycle. So effectively WAI becomes a relatively slow NOP (but STP is still effective).
Other notes from WDC indicate that the core logic actually has separate RDY input and output lines, but these are effectively shorted together in their 6502 and 65816 products, in such a way that the RDY output only pulls low, not high. WAI is implemented entirely through pulling the RDY output low in the third cycle, unless and until an interrupt arrives. Once that third cycle completes, RDY is released and the CPU will naturally either take an interrupt or continue execution - but the cycle could be of arbitrary length in terms of Phi2 clock edges.
Other notes from WDC indicate that the core logic actually has separate RDY input and output lines, but these are effectively shorted together in their 6502 and 65816 products, in such a way that the RDY output only pulls low, not high. WAI is implemented entirely through pulling the RDY output low in the third cycle, unless and until an interrupt arrives. Once that third cycle completes, RDY is released and the CPU will naturally either take an interrupt or continue execution - but the cycle could be of arbitrary length in terms of Phi2 clock edges.
-
backspace119
- Posts: 346
- Joined: 25 Jan 2019
- Location: Knoxville, TN
Re: 65xx continuously variable clock
Dr Jefyll wrote:
BigEd wrote:
A beginner project should not need RDY [...] which then keeps things simple.
The other part of the challenge is providing coherent information, because lack of same can (and I'm not exaggerating or being funny) be more of a problem than the problem itself! In a recently created thread I took a stab at organizing a collection of info, and if anyone has anything to add, please let me know or simply make a post in the thread: RDY vs CLOCK STRETCHING. Includes 2 very simple circuits
Just tonight I made some changes myself.... including, you'll be glad to hear, Ed, a tempering comment for novices and a bypass strategy which, during troubleshooting, can rule out Clock Stretching as a point of failure.
Chromatix wrote:
However, WDC themselves say that if RDY is actively driven high, WAI simply won't halt the CPU as it's supposed to.
-- Jeff
Re: 65xx continuously variable clock
Chromatix wrote:
The text seems to suggest [...] Other notes from WDC indicate [...]
( The other part of me is so mistrustful of WDC doc that I hardly care what they say! -- I'd rather reason things out for myself, or, if necessary, do an experiment!
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: 65xx continuously variable clock
(This does feel like one for an experiment, and then documenting in an appropriate thread. Edit to note: it mightn't be clear to relative newcomers, but some of the relative old-timers here do like to conserve and enhance the status of these forums as reference material: web searches are pretty good at finding relevant threads, if we create them. It's fine to have threads which are conversational or by way of a development log, but there's also a place for threads which answer one specific technical question, or lay out some understanding of a technical topic. It's always good to take the extra minute and linkify a post with references to documents, web pages elsewhere, or threads here. And don't forget, there's heaps more to 6502.org than these forums - there's a wealth of technical material too.)