Skip to content

EmmanuelDodoo/intel8080

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intel 8080 Emulator

An emulator for the Intel 8080 processor.

Features

  • Complete and accurate emulation of instruction set.

  • Support for external I/O handling

  • Interrupt handling

Running tests

You can run the tests by running cargo run -- --tests. The emulator passes the following tests:

  • 8080PRE.COM
  • TST8080.COM
  • CPUTEST.COM
  • 8080EXM.COM

The standard output is as follows:

**** Testing 8080PRE.COM
    8080 Preliminary tests complete
**** 169681 instructions

**** Testing TST8080.COM
    MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC
    VERSION 1.0  (C) 1980

    CPU IS OPERATIONAL
**** 95070 instructions

**** Testing CPUTEST.COM

    DIAGNOSTICS II V1.2 - CPU TEST
    COPYRIGHT (C) 1981 - SUPERSOFT ASSOCIATES

    ABCDEFGHIJKLMNOPQRSTUVWXYZ
    CPU IS 8080/8085
    BEGIN TIMING TEST
    END TIMING TEST
    CPU TESTS OK

**** 5528396777 instructions 

**** Testing 8080EXM.COM
    8080 instruction exerciser
    dad <b,d,h,sp>................  PASS! crc is:14474ba6
    aluop nn......................  PASS! crc is:9e922f9e
    aluop <b,c,d,e,h,l,m,a>.......  PASS! crc is:cf762c86
    <daa,cma,stc,cmc>.............  PASS! crc is:bb3f030c
    <inr,dcr> a...................  PASS! crc is:adb6460e
    <inr,dcr> b...................  PASS! crc is:83ed1345
    <inx,dcx> b...................  PASS! crc is:f79287cd
    <inr,dcr> c...................  PASS! crc is:e5f6721b
    <inr,dcr> d...................  PASS! crc is:15b5579a
    <inx,dcx> d...................  PASS! crc is:7f4e2501
    <inr,dcr> e...................  PASS! crc is:cf2ab396
    <inr,dcr> h...................  PASS! crc is:12b2952c
    <inx,dcx> h...................  PASS! crc is:9f2b23c0
    <inr,dcr> l...................  PASS! crc is:ff57d356
    <inr,dcr> m...................  PASS! crc is:92e963bd
    <inx,dcx> sp..................  PASS! crc is:d5702fab
    lhld nnnn.....................  PASS! crc is:a9c3d5cb
    shld nnnn.....................  PASS! crc is:e8864f26
    lxi <b,d,h,sp>,nnnn...........  PASS! crc is:fcf46e12
    ldax <b,d>....................  PASS! crc is:2b821d5f
    mvi <b,c,d,e,h,l,m,a>,nn......  PASS! crc is:eaa72044
    mov <bcdehla>,<bcdehla>.......  PASS! crc is:10b58cee
    sta nnnn / lda nnnn...........  PASS! crc is:ed57af72
    <rlc,rrc,ral,rar>.............  PASS! crc is:e0d89235
    stax <b,d>....................  PASS! crc is:2b0471e9
    Tests complete
**** 2919050698 instructions

Trivial Program

I included a trivial i8080 program which echoes 1 byte from stdin to stdout. Run this with cargo run -- --trivial.

Games

The project also contains an implementation of games made for the i8080. It only contains Space Invaders currently, but I will add more games later.

Space Invaders

Space Invaders demo gif

You can run this with cargo run --example invaders in debug mode or cargo run --release --example invaders in release mode.

Keybindings

Action Key
Insert Coin c
Start (1 player) 1
Start (2 players) 2
left (player 1)
left (player 2) a
right (player 1)
right (player 2) d
Shoot (player 1)
Shoot (player 2) w
Tilt Space
Increase Speed Tab
Reduce Speed Shift + Tab
Exit Esc

Acknowledgements

Much thanks to

Resources

About

Intel 8080 chip emulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published