Spent some more thoughts about the open_collector bus concept.
When trying to implement something like this, I think that the best approach
would be to use a 74AC541 with the data inputs tied to logic high
for injecting a maybe 30ns charge into the bus after the falling edge
of PHI2 for driving the bus lines high while all the pull_down drivers
on the bus are disabled.
This might work because the CPU isn't pipelined and the microcode ROMs
need more than 45ns to emit valid data after the falling edge of PHI2.
It's just that from what I know, nobody seemed to have built something
like this, so you can't be 100% sure that it would work in a reliable
way after making some more experiments...
as 4 layer PCBs don't tend to be inexpensive.
BTW: would say, that some care should be taken when choosing/placing
the bypass capacitors at the VCC pin of that 74541.
;---
On the other hand, my suggestion of having a "register" on the R bus which emits (A & X)...
from the microcode point of view, this would _look_ like another register...
and another "register" on the B bus which emits (DPH+1) wouldn't require
much modifications to the (already pretty crowded) register PCB.
And if the required circuitry for this modification won't fit on the ALU & CU PCB,
there still would be the option to build a CPU with two PCBs where the undocumented
opcodes won't be cycle exact (as quite a few of the "end users" probably won't
need to have them cycle exact, when using the 65C02 microcode for instance),
and to plug a "kludge PCB" which contains the required circuitry for making
them cycle exact between the register PCB and the ALU & CU PCB if required...
;---
Dr Jefyll wrote:
Wow, Dieter, you're fearless when it comes to wading into the deep end!
When I was active in hobby electronics, I had to find solutions to problems which were worse.
BTW: wading into the deep end might be less difficult than making it back from there.
Drass wrote:
this is all very ambitious, at least for me! Candidly, the whole project has been
a series of "deep ends", one after another, and I have to say a whole lot of fun as well!
Considering that this is your first CPU project, you really made it far.
And it's nice that you still enjoy this journey...
most people probably won't have the time and the patience to go for such a project.
BTW: you could try to make calculations for both variants:
for the open_collector bus,
and for my approach for sending (A&X) into R bus and (DPH+1) into B bus.
When I toyed with my C64, it really was (H+1), not just H.
;---
To me, ARR in decimal mode provides quite a problem.
Modifying the BCD correction circuitry of the CPU to match ARR in decimal mode
would be pretty hard.
Don't know how to do this... now... but I think this has the potential to slow down
the rest of the CPU.
The alternative would be building a "correction circuitry" only to be used with ARR
in decimal mode, but this would take:
2*74151, 2*74283, 1*74541...
and this probably won't simplify the flag evaluation circuitry.
Need to spend some more thoughts on this.
;---
Flag evaluation still is a topic, too.
Because in decimal mode, it still doesn't correctly replicate the incorrect NMOS 6502
flag evaluation.
When taking a look at Hanson's block diagram, to me it somehow looks like
the BCD correction circuitry seems to be "part" of the accumulator,
and the flag evaluation checks the ALU output before it enters the BCD
correction circuitry.
But the circuitry that detects $XA..$XF and $AX..$FX at the ALU output
(for controlling the BCD correction circuitry) somehow seems to be "part" of the ALU,
generating a carry which goes into ALU Bit 4 and ALU output carry.
;---
We _assume_ that the innards of the 6510 resemble the innards of the NMOS 6502
in most parts... but we don't know.
We don't know until somebody sliced the silicon of different 6510 versions,
made a transistor level simulation of it, and figured out how it works in detail.
And this probably won't happen in the next time.
Point is, that just "assuming" something in the world of hardware design
could be going to be quite expensive in terms of time and money sometimes.