Sir-Irk / c8080

Bare 8080 cpu emulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Bare 8080 cpu emulator

License:MIT License


Languages

Language:C 66.2%Language:Assembly 33.8%