Giter Site home page Giter Site logo

jobala / hack-emulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hithroc/hack-emulator

0.0 0.0 0.0 610 KB

In-browser emulator of Hack CPU from nand2tetris course

Home Page: https://hithroc.github.io/hack-emulator/

License: MIT License

JavaScript 2.37% TypeScript 92.02% CSS 5.61%

hack-emulator's Introduction

Hack Emulator

This project emulates Hack computer from nand2tetris course. It is still under light development (light means that I might add/fix/polish things from time to time, but not actively).

https://hithroc.github.io/hack-emulator/

Current features

  • Built-in assembler (although it is very crude and doesn't really have error reporting as of yet)

  • ROM view, including binary machine code as well as the coresponding instructions. Current instruction (program counter) is highlighted.

  • RAM view

  • Full ALU implementation, which includes undocumented instructions, unlike the official CPU emulator.

  • Adjustable clock speed (although I would not recommend to go above ~10MHz)

  • Full support for keyboard input and display output.

  • All in your browser on any device! No Java required!

Kinda Maybe Sorta Planned features:

  • Breakpoints

  • Ability to modify values in RAM

  • Running official test files

  • Ahead of time compilation as well as other optimizations

  • Perhaps some extensions to Hack, like

    • Memory banks

    • Colored display

    • Periferals like storage?

    • 6/N-key rollover support

  • Light/dark theme support?

Building

To build the project you need Node 12.x. Then you can just run:

npm install
npm run-stript build

This should create app.js file in ./dist/. You can open ./dist/index.html in your browser.

Contributing

Ha, like anyone ever will!

Some other notes

This project was mostly written in about a week to get some practice with TypeScript and React (given that I've not used either before), so there might be some rough edges or non-idiomatic code/project structure. Reviews are welcome!

hack-emulator's People

Contributors

hithroc 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.