Hello all. I love the curiosity, energy and enthusiasm of folks on this forum - thanks to one and all for all your inputs. Apologies for delays between replies, work has been consuming rather a lot of my time.
So, there are a large number of potential issues, suggestions, ideas, experiments and questions in response to me providing the decoding logic - a lot to ponder here!
Let me try and provide a few more details in response to some questions (I've tried to go through all the replies, hopefully I didn't miss any biggies):
- Thanks to Jeff and Bill for providing a monochrome and tidier diagram that BDD can read, looks very good to me also
- @Chromatix - I did mention that I didn't think the logic was optimal, but the guidance that you and others give in terms of using address to qualify Chip Select and Phi2 with RWB to qualify Read-Write is a good one that I will look at. Without more clever parts than NAND and NOT, I haven't yet worked out how to minimise the number of gate delays. Four is a lot, and there may be nice ways to use the /CS1, CS2 with /E1, /E2 and E3 lines for RAM and 138 decoder - but I haven't figured it out yet. But might not be the problem of course..
- @BillO - yes the 4 gate delay is quite large. I had and still have a constraint on what parts I have, so LS and HCT type NAND and NOT parts is in my bag of bits and I fancy to try and keep it that way (I'm a tight-arsed British bloke doing things purposely on the cheap!). But, as pointed out by you and others, the address becomes valid way before Phi2 rises, so for the moment I am hoping this is not the issue. If other things don't work then I will have to fork out on some faster parts perhaps.
- @GaBuZoMeu - The 4 bit comparator idea would indeed work, but I didn't have one at the time and hoping not to have to buy more parts! I will do if I must at some point
- @Dr Jefyll - Although I am qualifying /CS1 with Phi2, it seems this is bad. I need to make /CS1 only use address, and then use Phi2 for /WE and /OE. /OE is tied low, but of course I can change that.
- @BDD - Yup, as you note, 4 bit decoders could do the trick here. I don't have any yet, so will try other things first. I think it was a couple of years ago now, but you probably told me about the mistake of using Phi2 to qualify selects - which fixed my problem when moving from 6526 PIA to 6522 VIA! So I am now only using Phi2 to qualify RAM /CS1
- @Dr Jefyll - In answer to your questions : Yes, I am using a single Phi2 source for all clocks, definitely not using the 6502 clock output on pin 3 or 39. The Phi2 in the diagam is the same Phi2 that feeds the 6502 on pin 37.
So, you may have determined from my decode logic and other things I have said, that I haven't been looking deeply at the datasheets
But somehow, she runs fine with 70ns RAM (did I just call my creation she!?). I am tempted to just let it go, but another part of me wants to sort out some basics. I like the principle of not using Phi2 for any chip select that you have all basically applied to your own works.
So I will start with that. Looks fairly straightforward:
- I will connect /OE to a NAND which has R/W and Phi2 as input
- I will connect /WE to a NAND which has inverted R/W and Phi2 as input. This will introduce an extra gate delay of course (currently direct connect to R/W)
So that will bring my decoding in to line with the core principle of letting address select the RAM, and then Phi2 with R/W select read or write. Except for the ROM - I don't see this where my problem lies though.
That's the start of the experiment. When I have done that, I'll come back with my findings. Thank you all again, really enjoy these interactions.
Cheers, Dolo