GaBuZoMeu wrote:
There is no danger to pull RDY low when it is already low, but that could only happened if there was a WAI instruction and the releasing interrupt is pending.
Yes, I thought that would be the case. Thanks for the confirmation.
GaBuZoMeu wrote:
One thing I am wondering about is that you stop the processor from working if you wish to access video RAM. Most circuitry for 68xx or 65xx (due to the similar bus) use PHI2=0 for video accesses ("hidden access"). Having an FPGA it should be easy to read video RAM in advance during PHI2=0 and buffer that datum until it wents to the shift logic. If you "simply" manage to buffer one or two video RAM accesses you never need to stop the processor. Of course, the RAM must be able to serve two reads in one processor cycle as worst case.
I did think about that, but the timing doesn't work out, and as Chromatix mentions above the '816 puts the upper bits of the address on the bus during PHI2 low. Since I have 4Mb of memory I need the bank address. My cycle time is 140ns, 70ns PHI2=0, 70ns PHI2=1. I can't tristate the bus until 10ns into PHI2 low or I violate the hold time on the data bus from the previous cycle, and tristating takes 30ns so now I've lost 40ns of the 70 I have available. My RAM is 55ns memory and even worse, my ROM is 70ns. I have character data in ROM so blocking the processor is really the only option I could come up with. I am only planning on a resolution of 320x200 so I won't need the bus that often.
By the way, I spent 6 years in Germany when I was younger, my dad was in the army, and he was stationed in Nuremberg in the early 80's. Beautiful country, wonderful people. I miss it quite often.
Chromatix wrote:
- If your video output only needs RAM access on a minority of bus cycles, have it opportunistically read ahead during CPU internal cycles. These are signified by VPA and VDA both being inactive, and you can feed a combination of these back to the BE signal to have the CPU relinquish the bus when it's not using it. You'll still need to use the RDY method if your readahead buffer goes empty, due to the CPU executing data cycles continuously for too long.
This might actually be doable, the timing would be tight since VPA and VDA aren't valid until 40ns into the cycle, but I think I could make it work. However, as you noted I would still have to implement halting the processor with RDY and add additional complexity on top of it. I'm already well beyond my feeble capabilities
Chromatix wrote:
- Move your framebuffer to a separate RAM array on an isolated bus, to which the video system has priority access, and which the CPU only accesses for specifically video-related purposes. This allows the CPU to proceed unimpeded for general computation, and it will still respect RDY in case of framebuffer access contention.
This is also a good idea, but it would require more IO pins than I have available.