|
One technique I used was to test against a known working core. I fitted my emulator engine to output in text form the contents of each register after every instruction. Then, I did the same thing with Neil Bradley's cpu core. I ran some test programs, which generated huge text files with the register values in them. I did a file compare to see where my results deviated from the known working core. This technique is easy to implement and will catch nearly every register and flag related problem. It will not catch problems which modify memory incorrectly, as logging the entire contents of memory on each instruction would consume too much disk space.
|