Git Product home page Git Product logo

dcpu16-erlang's Introduction

Build Status

What is this?

This is a go at implementing the DCPU-16 processor in the upcoming game 0x10c. Everyone seems to be doing one, so I thought I'd have a go, and just to make it more interesting I decided to try it in a language I'm not particularly familiar with Erlang. Perhaps when I've finished this one I might try implementing it in lisp ;)

The main focus of this implementation is correctness. I am attempting to make the CPU core execute instructions with the correct timings as defined in the DCPU16 specification in the docs folder. The way I am hoping to achieve this is by breaking the individual instructions down into micro-operations. A micro-operation takes either 0 or 1 machine cycles. Any one call the cycle function will execute at most a single micro-operation with a cost of 1 and as many as are available with cost of 0.
Thus to achieve the correct instruction timings all I need to so is break the DCPU16 instructions down into the correct micro-operations in the correct order. This also has the advantage that it is easier to test as all I need to do is make sure I exercise each of the top level instructions (ADD, SUB, MUL and so on) and each of the micro-operations.

Compiling

make

Running

erl -pa ebin
application:start(dcpu16).
dcpu16_server:test_call("Call").
dcpu16_server:test_cast("Cast").

dcpu16-erlang's People

Contributors

dparnell avatar zpeters avatar

Stargazers

 avatar George Schneeloch avatar Andrei Bocan avatar

Watchers

 avatar James Cloos avatar  avatar

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.