GithubHelp home page GithubHelp logo

superzazu / 8080 Goto Github PK

View Code? Open in Web Editor NEW
151.0 151.0 23.0 158 KB

A complete emulation of the Intel 8080 processor written in C99.

License: MIT License

Makefile 0.46% Assembly 30.70% C 68.84%
8080 cpu emulation

8080's Introduction

8080's People

Contributors

gergoerdi avatar irevoire avatar superzazu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

8080's Issues

Incorrect cycles?

Most likely just a typo. In the cycle table, the cycles for XCHG is listed as 5, when it should be 4.

Or, the cycles for "CALL adr" should be 17, while the table only adds 11.

Consider changing the CP/M printing subroutines

Another thing from Discord.

Currently you use ports to print stuff in the CP/M subroutines.

You could change this to something else for readability's sake. At the very least I think it'd make sense to change the subroutine using IN to use OUT, which makes more sense. (Especially since the input you get in that port is hardcoded to 0xFF now, for some reason.)

Add proper disassembly

We talked about this on Discord, but just plonking it here for posterity.

It'd be nice if the disassembly in the debug output was an actual disassembly, ie. that it produced working assembly code. Right now you only print placeholder characters for immediate values, for example.

Apparent bug with the ANI instruction?

According to the manual, the ANI instruction clears the carry flag and the half flag (auxiliary flag). This isn't done in i8080.c (case 0xE6). I suggest adding c->hf = 0 at case 0xE6 to reflect this. It still passes all the test with this added, but it was just a discrepancy between my emulator and yours.

Simplified "self-referencing" for functions in a structure

I really appreciate your work. I am using it to build an 8085 emulator of my CP/M project.
Two minor issue you may want to look at:

  1. A simplified way of using "self-referencing" functions in a structure. Have a look at my version of your header file.
    i8085_h.txt

  2. Pretty minor but the 8080 interrupt can handle one, two and three byte opcodes. Your code only allows a single byte opcode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.