Project: semi-fail - suggestions please
Re: Project: semi-fail - suggestions please
I've just had a quick look at your schematic.
In my experience, RAM timing issues can cause some very weird failure modes.
As mentioned earlier by BDD, on the W65C02 it's recommended not to use Phi2O (pin 39), as Phi2 (pin 37) is the main timing reference.
By using PHI2O in your GAL to gate the RAM write-enable signal, the RAM write actually happens later than is ideal.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Dave
In my experience, RAM timing issues can cause some very weird failure modes.
As mentioned earlier by BDD, on the W65C02 it's recommended not to use Phi2O (pin 39), as Phi2 (pin 37) is the main timing reference.
By using PHI2O in your GAL to gate the RAM write-enable signal, the RAM write actually happens later than is ideal.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Dave
Re: Project: semi-fail - suggestions please
hoglet wrote:
I've just had a quick look at your schematic.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Code: Select all
/* Intermediate values */
a = A15 & A14;
b = A10 & A11 & A12 & A13 & A14;
/* Output definitions */
RD = !RW;
RAM_WR = !(Phi2 & !RW);
RAM_CE = A15 # b;
ROM_CE = !A15;
IO_CE = A15 # !b;
Re: Project: semi-fail - suggestions please
Perhaps my eyes are ricking me - tracking R/W down it is grounded or say connected to p12 of the GAL. This could never work. I'm sure R/W is meant to be connected to p14 or p23 of that GAL - correct?

- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Project: semi-fail - suggestions please
Could you please post a memory map for your machine?
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Project: semi-fail - suggestions please
hoglet wrote:
This related thread was also quite interesting. On an Acorn Atom the 60Hz VSYNC signal is asynchronous to the 6502 clock. It's possible to write a program that will fail after maybe an hour due to metastability propagating through the 8255 and on to the 6502.
http://www.stardot.org.uk/forums/viewto ... 9&p=200632
http://www.stardot.org.uk/forums/viewto ... 9&p=200632
Re: Project: semi-fail - suggestions please
hoglet wrote:
I've just had a quick look at your schematic.
In my experience, RAM timing issues can cause some very weird failure modes.
As mentioned earlier by BDD, on the W65C02 it's recommended not to use Phi2O (pin 39), as Phi2 (pin 37) is the main timing reference.
By using PHI2O in your GAL to gate the RAM write-enable signal, the RAM write actually happens later than is ideal.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Dave
In my experience, RAM timing issues can cause some very weird failure modes.
As mentioned earlier by BDD, on the W65C02 it's recommended not to use Phi2O (pin 39), as Phi2 (pin 37) is the main timing reference.
By using PHI2O in your GAL to gate the RAM write-enable signal, the RAM write actually happens later than is ideal.
Edit: One other thing I spotted is that the RAM CS signal is tied low. Isn't the effect of this that I/O writes will also write to the RAM? This seems wrong.
Dave
It will write to RAM, but in an area that is not used (shadowed by the I/O).
I think we need to keep in mind this works just fine with an R65C02 or with an NMOS CPU. No issues at all. The problems are only seen with the WDC part.
Bill
Re: Project: semi-fail - suggestions please
GaBuZoMeu wrote:
Perhaps my eyes are ricking me - tracking R/W down it is grounded or say connected to p12 of the GAL. This could never work. I'm sure R/W is meant to be connected to p14 or p23 of that GAL - correct?

R/W from the cpu goes in to pin 11 of the GAL , Phi-2 in on pin 10 and the Phi-2 qualified R/W is output on pin 16.
Pins 13, 14 and 23 are unused inputs and are tied to ground.
Bill
Re: Project: semi-fail - suggestions please
BigDumbDinosaur wrote:
Could you please post a memory map for your machine?
0000 - 7BFF RAM
7C00 - 7FFF I/O
8000 - BFFF Bank switched ROM
C000 - FFFF ROM (ACIA monitor and EhBASIC)
Things done so far:
System Phi-2 now connected to pin 37 - pin 39 floating
NMI, IRQ and SO tied to Vcc, RDY and Reset held high trough 3K resistors
RAM /CE and /OE tied together (although this should not be needed).
Behavior has changed, but it's still not working with the WDC chip. Before, as I said I'd see toggling on the VP line before it went dead - so I presume there were glitches happening on the IRQ or NMI lines. Now there is only a single pulse in VP when reset occurs as it should be. There is no activity on the RDY line and it is no longer stopping dead. Instead it begins the memory test, runs for a few cycles and then goes back to the "Memory size ?" prompt. Entering anything there it will still just go back to that prompt. This behavior is consistent all the way out to 14mHz.
Bill
Re: Project: semi-fail - suggestions please
Sorry for my last post. Seems that I was tricked somehow
I have not try to get the source fpr EhBasic, if it scans memory similar to M$Basic it might get puzzled by the I/O circuitry. Would it work if you simply enter a valid size?
Cheers
I have not try to get the source fpr EhBasic, if it scans memory similar to M$Basic it might get puzzled by the I/O circuitry. Would it work if you simply enter a valid size?
Cheers
Re: Project: semi-fail - suggestions please
BillO wrote:
...There is no activity on the RDY line and it is no longer stopping dead. Instead it begins the memory test, runs for a few cycles and then goes back to the "Memory size ?" prompt. Entering anything there it will still just go back to that prompt. This behavior is consistent all the way out to 14mHz.
Re: Project: semi-fail - suggestions please
GaBuZoMeu wrote:
Sorry for my last post. Seems that I was tricked somehow
I have not try to get the source fpr EhBasic, if it scans memory similar to M$Basic it might get puzzled by the I/O circuitry. Would it work if you simply enter a valid size?
Cheers
I have not try to get the source fpr EhBasic, if it scans memory similar to M$Basic it might get puzzled by the I/O circuitry. Would it work if you simply enter a valid size?
Cheers
Bill
Re: Project: semi-fail - suggestions please
BigEd wrote:
BillO wrote:
...There is no activity on the RDY line and it is no longer stopping dead. Instead it begins the memory test, runs for a few cycles and then goes back to the "Memory size ?" prompt. Entering anything there it will still just go back to that prompt. This behavior is consistent all the way out to 14mHz.
Interesting this is, just a while back as I was putting a 10x scope probe on the RDY signal, it started working fine as long as I had the probe on RDY. For a few minutes - now I can't reproduce the effect. This was before I had changed the resistor on RDY from 10K to 3K. However, at least now the machine is running and not dying. I feel progress has been made.
Update:
Holy cr#p! That worked!!! Delaying the clock to the W65C02 by a few nS has done the trick!!! It is now cruising along at a comfy 15mHz without a hiccup.
Awesome!
Thanks Ed - and to everyone else for pitching in on this one.
So it looks like these 15nS RAM chips are too fast?
Bill
Re: Project: semi-fail - suggestions please
First of all - congratulation!
Hmm, this is a bit puzzling - you now use the crystal clock directly for everything but the CPU and the CPU requires a brief delayed clock (say one or two buffer delays) ???
Indeed strange - and not very comfortable, as you cannot switch between various CPUs by simply plugging. Somehow unpleasant.
Hmm, this is a bit puzzling - you now use the crystal clock directly for everything but the CPU and the CPU requires a brief delayed clock (say one or two buffer delays) ???
Indeed strange - and not very comfortable, as you cannot switch between various CPUs by simply plugging. Somehow unpleasant.
Re: Project: semi-fail - suggestions please
That's a good result! I think - I hope - with a suitable diagram of the glue logic and the timing, it'll be more clear what went wrong. I suppose it could be that 15ns RAMs are not really compatible with the timing constraints of the CPU, but it could equally well be that reconfigured glue logic would sort the problem out more conventionally than a delayed CPU clock.
Re: Project: semi-fail - suggestions please
BigEd wrote:
That's a good result! I think - I hope - with a suitable diagram of the glue logic and the timing, it'll be more clear what went wrong. I suppose it could be that 15ns RAMs are not really compatible with the timing constraints of the CPU, but it could equally well be that reconfigured glue logic would sort the problem out more conventionally than a delayed CPU clock.
Just as an aside, the bodged clock timing works with both the R65C02 and the NMOS 6502's at their rated speed.
Update: No, The 7nS GAL still needs the clock bodge.
Bill