Unknown
From NAND to Tetris is a course that teaches the fundamentals of computer architecture by building a computer from the ground up. The course starts with NAND gates (simulated in a hardware emulator), and progresses through the construction of a full computer system, including a CPU, memory, and ultimately an operating system capable of running a program such as Tetris.
I've always had a passing interest in computer architecture (especially since it's closely related to my passion of programming language design), and I finally got around to completing the course, which was a ton of fun! This page is mainly to link to my solutions for each of the course's projects.
Here's a few shots of my Tetris implementation.
It doesn't have any bells or whistles, but it works! If you wish to play it, you'll have to download the project and course materials, and run it with the VMEmulator.
git clone git@github.com:david-andrew/nand2tetris.git
cd nand2tetris
unzip nand2tetris.zip
# compile the tetris project
bash nand2tetris/tools/JackCompiler.sh projects/9/Tetris
# run the emulator
bash nand2tetris/tools/VMEmulator.sh
Then load and run the Tetris directory in the emulator. Only controls are left/right to move, and up/down to rotate.
I'm looking into getting it to run directly on this page, but it'll probably involve running Java with WebAssembly, which seems pretty non-trivial, so TBD.