Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.1 KB

README.md

File metadata and controls

25 lines (16 loc) · 1.1 KB

c8080

Bare 8080 cpu emulator. Based on this guide http://www.emulator101.com/welcome.html

Currently does not support DAA(Decimal Adjust Accumulator) instructions.

This repo doesn't include any machine layers.

Planned features:

  • DAA support
  • Cycle stepping instead of instruction stepping for better compatibility with other hardware emulation.

Testing

The code was tested using the cpudiag progam found in the test folder.

Compile test.c with: clang test.c -DCPUDIAG=1 or gcc test.c -DCPUDIAG=1

When you run it you should see CPU IS OPERATIONAL

Note: the cpudiag code uses a platform specific instruction ORG 00100H to start the program at byte 0x100. To deal with this test.c does a little trick to make it work.

There is also a special version of CALL(0xcd) in the emulator for handling the printing for the diagnostic program. This needs to be enabled with -DCPUDIAG=1 when you compile for testing.