wd5gnr / 1802UNO

An RCA COSMAC 1802 simulation for the Arduino mostly aimed at the KIM UNO hardware. Will work without it though.
19 stars 7 forks source link

instruction 0x7c, adci should add df? #2

Closed sjaturner closed 1 year ago

sjaturner commented 3 years ago

My datasheet has ADCI as:

M(R(P)) + D + DF -> DF, D; R(P) + 1 -> R(P)

1802.cpp:261 seems to omit DF (noticed this comparing against my own implementation). I may be wrong though :-)

Just want to say that I'm very impressed with this project. Thank you!

wd5gnr commented 3 years ago

I just saw this. Will have to take a look.

sjaturner commented 2 years ago

I wrote a similar emulator (much less efficient that yours) and harnessed your code that. I fed random op codes into both until the results came out the same. The only things I found were the issue described in this thread and a weird corner case with short jumps at the end of a page. There's a description here: http://bitsavers.trailing-edge.com/components/rca/cosmac/MPM-201A_User_Manual_for_the_CDP1802_COSMAC_Microprocessor_1976.pdf

image

I used my the emulator which I coded for this: https://github.com/sjaturner/microwriter_mw4

Thanks again for your excellent work!

wd5gnr commented 1 year ago

Attempted to fix both of these plus an old BIOS problem. Thanks!