emu-russia/dmgcpu

CPU parts

msinger opened this issue · 1 comments

Hey, I noticed you tried to identify the CPU parts. Just wanted to give you my thoughts on that. Of course I could be wrong, but I strongly believe that the part in the upper left, that you suspect to be the sequencer, is actually the 4-bit ALU. It looks like it is made out of four similar vertical slices, one for each bit. The slices can't be perfectly identical because of the 0x66 and 0x99 comparators that may be in there for the DAA instruction. It also looks similar like the ALU in the Z80, but since it misses some functionality, like parity flag and stuff, it just looks similar, not identical. I suspect that they route simple register-to-memory LD instructions through the ALU as well, because the result at the top of the ALU is very close to the external data bus tri-state buffers. This would mean that the internal data bus(es) are organized a bit different compared to the Z80.

The sequencer logic could be in the top right, that you labeled "WTF?".

The bottom part are the register banks and most likely also a 16-bit incrementer/decrementer for PC and SP addresses, which can output it's result to the address lines to the right of the register bank. Contrary to some believe out there in the internet, I don't think that they have a 16-bit adder that can add anything else than +1 and -1 to an address. The required clock cycles needed by 16-bit ADD instructions are long enough so that those additions can be serialized through the regular 4-bit ALU. I've already implemented the CPU in that way and it works out well.

I'm very excited about your project and that we might finally have some schematics for the CPU soon. And I'd like to figure out if my assumptions described above are correct. I dreamed of this for soooo long. :)

Thanks for the great description of the ports! And for those notes :)

Yes, I'm beginning to suspect that the Sequencer is right-top, since that's where the `Wakeup' signal comes in.

I need to untangle more wires, which is what I'm doing now. :D