https://floooh.github.io/visualz80remix/
Improvements include Assembler and Timing Diagram options.
VZ80R is fun to use and some interesting Z80 properties can be seen. How the internal WZ register pair changes is easy to track. There are 5-bit and 6-bit shift register ring counters for M cycles and T states, respectively. M cycles can be skipped, e.g. POP BC has three M cycles, however instead of M1-M2-M3 they are M1-M4-M5. Other instructions also skip M cycles.
T states can never be skipped but during all internal or external wait states none of the T counter bits is set, which pauses the CPU. How the Z80 knows which T state to move on to after the wait is a bit of a mystery.
This weekend I discovered a bug using VZ80R. More details at https://stardot.org.uk/forums/viewtopic ... 36#p357136
Note: VZ80R uses the wrong node number for IFF1 (Interrupt Flip-Flop 1). IFF1 can be traced by entering 181 in the Watch: box in Trace Log. IFF2 is node 206.
Tip: Use first and third control buttons at top right to go backwards or forwards by one half-cycle and sixth button (Eject) to reset the Z80 simulation.
So that you can see the difference between original and remix, here is a URL that runs the program at the bottom of this post in VZ80:
http://www.visual6502.org/JSSim/expert- ... &steps=160
Code: Select all
XOR A
LD BC,1234H
LD DE,5678H
LD HL,9ABCH
LD SP,0100H
PUSH BC
EX (SP),HL
POP BC