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).
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.
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:
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
Periferals like storage?
6/N-key rollover support
Light/dark theme support?
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
in your browser.
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