Paganini wrote:
Hi Chad,
I just want to say that I really like this approach. Your design doc reminds me of the kind of in-depth hardware coverage you used to be able to get for old school systems. (Kind of like those Chilton manuals my dad used to have for our cars that had a technical drawing for every bolt.) One of the things that got me into retrocomputing in the first place is that the old A500 had this kind of manual, but none of my PCs ever did! That sure got frustrating.
Haha, thank you, but I don't match up to Chilton in the least!
kernelthread wrote:
Just a quick question. Do you really want SO to the CPU to be asserted whenever either SPI_MISO is low or you execute a _B opcode? That could result in the overflow flag being randomly set thus rendering it unusable for its usual purpose. It would seem more useful to assert SO if SPI_MISO is low AND a certain _B opcode is executed - this would allow the CPU to sample the SPI_MISO signal into the V flag but leave it alone otherwise. Also, note that SO is sampled on the rising edge of PHI2, which might complicate things since _B opcode detection happens when PHI2=1.
So, I have never ever used the overflow flag for anything besides... well, this. Like, in all of my coding thus far, which is closing in on year, I have never needed or even thought of using the overflow flag. Heck, I don't even use BIT operation, um, ever. Inefficient? Perhaps.
The idea with the AND gate is that I didn't have any others to spare. It works though, as far as I can tell:
MISO is normally pulled up, as is the /ILLEGAL-XB pin. If MISO stays high during a read, I will CLV, toggle the /ILLEGAL-XB pin, and it will set the V flag. If MISO stays low during a read, I will CLV, toggle /ILLEGAL-XB, and nothing changes.
The illegal opcode circuit for the '138 and '259 came directly from Dr Jefyl's own circuits, so I'm kind of relying on that here. I intend on putting some NOP's after each of these $_3 and $_B just for safety.
Thank you, good question!
Chad