T80 Core To Be The Most Precise 8080 To Date
8080 Emulation Quality
8080 has many dark corners. Unlike its more popular successor Z80, 8080 had never
been studied enough and most emulator code, and FPGA cores, relied on
data from various books and often even word of mouth. Thusly, it's known that
DAA instruction doesn't yield correct result after subtration but it's not known why
and AC flag has mysterious ways too..
Just recently a few enthusiastic people from a Russian
Vector-06c fans forum
found a piece of software for Vector-06c
which could not be started in any of the existing emulators, couldn't be started
in my FPGA replica yet had no problem running in the real Vector-06c at all.
After some investigation it turned out that 8080 ALU had AC flag inverted
after SUB operation. This involves SUB, SBB, SBI, DCR, CMP, CPI instructions.
The pesky ware used the
contents of 8080 flags register as a branch address. Ultimately it led to this
discovery of auxilliary carry anomaly.
While fixing this issue in the
which I use in my Vector-06C replica, I discovered a lot of other discrepancies with
the original CPU. Thanks to the ultimately inquisitive CPU test written by Ian
Bartholomew, 8080 Exerciser,
I was able to verify my version of T80 against the baseline set by the real CPU
in a real computer.
Probably not an earth-shattering news, but this is a milestone in
emulation of 8080 CPU nevertheless. As of now, there are no known tests that could tell
my version of T80 in 8080 mode from the real thing. Update your emulators
or you're going to lose the edge :) Only my version has these changes
at the moment, they had not been merged with the "official" opencores.org version.
One thing worth noting: real CPU tests were done on a KR580VM80A, which is known
to be a gate-level clone of 8080, but still not exactly the real thing.
If you have a real 8080 CPU computer which can run CP/M 2.2 or similar, please try
Ian's test on your computer and send the results to him or to me.
Syndicated 2009-09-23 21:21:02 from svo's interactive persuasion vehicle