Ok, I have a very basic Z80 system wired up with an Arduino and some shift registers. To test, I just had the Arduino look for MREQ, RD and M1 and then write out a byte. This was originally an array, but now I'm just looking for the 1001 location and writing out a JP opcode. Since it otherwise holds everything low, it should jump back to zero, and loop. And it does this. But I'm seeing something else(the first binary number is the data, second is the address requested by the Z80):
Writing: 0 from 1
Writing: 0 from 10
Writing: 0 from 11
Writing: 0 from 100
Writing: 0 from 101
Writing: 0 from 110
Writing: 0 from 111
Writing: 0 from 1000
Writing: 11000011 from 1001 <— here is my JP opcode
Writing: 0 from 1010 <first part of the address
Writing: 0 from 1011 <second part
Writing: 0 from 0 <YAY! It jumped back to zero like expected!
Writing: 0 from 1010 <What is this?
Writing: 0 from 1 <Why is the address bus incrementing two numbers?
Writing: 0 from 1011
Writing: 0 from 10
Writing: 0 from 1100
Writing: 0 from 11
Writing: 0 from 1101
Writing: 0 from 100
Writing: 0 from 1110
Writing: 0 from 101
Writing: 0 from 1111
Writing: 0 from 110
Writing: 0 from 10000
Writing: 0 from 111
Writing: 0 from 10001
Writing: 0 from 1000
Writing: 0 from 10010
Writing: 11000011 from 1001 <It hit the JP opcode again
Writing: 0 from 10011 <What is this?
Writing: 0 from 1010 < Correct
Writing: 0 from 1011 <— Correct
Writing: 0 from 0 <jump is still working
Writing: 0 from 10100 < Still counting?
Writing: 0 from 1
Writing: 0 from 10101
Writing: 0 from 10
Writing: 0 from 10110
Writing: 0 from 11
Writing: 0 from 10111
Writing: 0 from 100
Weird Z80 behavior
page revision: 0, last edited: 11 Feb 2007 00:15