Hello everyone!
I'm here today to ask for a second pair of eyes on my schematic. Full story (still short): I had been working on a design like this for almost 6 months, but when I soldered it all together a couple of weeks ago, DOA. I am pretty sure it is data-bus contention because I tied BE directly to PHI2. To correct this mistake, I have redesigned the computer and am posting what I have here.
Here is the link to my video explaining the schematics, it's 12 minutes long:
<VIDEO LINK DELETED>
Attached are the B&W and Color versions of the Schematic I used in the video. Also, below is my IRQ-ISR code.
I would love to have your opinions on it. Not just that, but if you find anything that potentially won't work, I would *love* to know now before I order some boards and waste money on soldering parts to a large paperweight (again).
This is not meant to be fancy! It is fairly simplistic, hardly any expansion capabilities, but that's just the point. I'm not looking for "hey you should add X to it", I'm looking for "hey your logic here is wrong."
Any criticism is greatly welcomed. Thank you all very much, have a wonderful day.
Chad
Code:
; 6502 running at 1.57 MHz,
; PS/2 keyboard running at 17 kHz
; That gives me 92 cycles between signals.
; /IRQ = Keyboard-Clock
; /SO = Keyboard-Data
; *** Need to use $_B illegal instruction to set /SO line!
irq_vector ; cycles = 7
CLC ; cycles = 2
ROL key_data ; cycles = 6
CLV ; cycles = 2, clears overflow bit
.BYTE $0B ; cycles = 1, sets the /SO line to whatever is on Keyboard-Data
BVS irq_check ; cycles = 2, low value on /SO
INC key_data ; cycles = (6), high value on /SO
irq_check ; cycles = (1)
DEC key_counter ; cycles = 6
BEQ irq_store ; cycles = 2
BMI irq_clear ; cycles = 2
RTI ; cycles = 6 -> total = 42
irq_store ; cycles = 1 (sub-total 34)
PHA ; cycles = 3
PHX ; cycles = 3
LDA key_data ; cycles = 4
LDX key_write ; cycles = 4
STA key_array,X ; cycles = 5
INC key_write ; cycles = 6
PLX ; cycles = 4
PLA ; cycles = 4
RTI ; cycles = 6 -> total = 74
irq_clear ; cycles = 1 (sub-total 36)
PHA ; cycles = 3
LDA key_counter ; cycles = 4
CMP #$FC ; cycles = 2
BNE irq_exit ; cycles = 2
LDA #$09 ; cycles = 2
STA key_counter ; cycles = 4
PLA ; cycles = 4
RTI ; cycles = 6 -> total = 64
irq_exit ; cycles = 1 (sub-total 49)
PLA ; cycles = 4
RTI ; cycles = 6 -> total = 59
EDIT: Edited the code as per BDD's find.