Hi,
emulating a CPU is hard. No surprise there, I guess. :-)
For the Intel 8080/8085 and Zilog Z80 processors, there are excellent instruction exercisers available (here for 8080/8085 or here for Z80, which will tell you if the CPU (or emulators) works correctly, by testing all instructions...