marmolejo / zet

Open source implementation of a x86 processor
http://zet.aluzina.org
GNU General Public License v3.0
304 stars 64 forks source link

Bug in DAA #6

Open fordp2002 opened 7 years ago

fordp2002 commented 7 years ago

See https://github.com/hoglet67/PiTubeDirect/issues/42 for more information!

hoglet67 commented 7 years ago

Thanks Ford for creating this issue.

Specifically. these are the 6 cases where Zet incorrectly sets the carry flag:

cf=0 af=1 al=  0 : cfout=1 afout=1 alout=  6
cf=0 af=1 al=  1 : cfout=1 afout=1 alout=  7
cf=0 af=1 al=  2 : cfout=1 afout=1 alout=  8
cf=0 af=1 al=  3 : cfout=1 afout=1 alout=  9
cf=0 af=1 al=  4 : cfout=1 afout=1 alout=  A
cf=0 af=1 al=  5 : cfout=1 afout=1 alout=  B

Some context: We're using Zet in the Matchbox Co Processor for the Beeb to re-implement Acorns 80186 Co Processor: https://github.com/hoglet67/CoPro6502/wiki

Over the last couple of years I've made several other bug fixes, which you can see in the history here: https://github.com/hoglet67/CoPro6502/commits/master/src/zet

There's still at least one more latent bug, as the debugger D86 just hangs on startup. Not had a chance to look into this.

Thanks for all your work on Zet, much appreciated.