Rubbing the CPU with hands and playing *The Matrix*. Sure enough, the real masters are among the common people.
What can you accomplish with a soldering iron in three months?
This guy with the online name MINT handcrafted a CPU from scratch. He handled everything from design, wiring to programming all by himself.
Moreover, he used old memory chips and logic components from the 8 - bit era (the 1970s and 1980s).
To show off his skills, the guy wrote some code and used this handcrafted CPU to play "The Matrix" on a VFD screen.
The resolution is a bit low, but the smooth playback is quite impressive.
The Ultimate Form of Handcrafted CPU
This handcrafted CPU is called EPROMINT. Judging from the appearance, the whole CPU uses four perforated boards and weighs about 500 grams. If all the circuits were laid out, the total length would be about one kilometer.
In terms of configuration, EPROMINT is still 8 - bit, which is definitely no match for the performance of today's 64 - bit CPUs (details are as follows).
However, compared with the 8 - bit CPUs from several decades ago, it is still remarkable. It can run according to the real instruction set, execute its own assembly code, and react to hardware interrupts like commercial processors.
Even its computing speed is more powerful than the retro idol products of that time.
For example, the MOS 6502 that powered the Apple I/II and the Nintendo Entertainment System, or the Z80 that dominated the CP/M system, may be slightly inferior to this handcrafted CPU. The smooth playback of "The Matrix" is good evidence.
How was EPROMINT Made?
The idea of handcrafting a CPU originally came from an experiment MINT did before. He used outdated EPROM storage chips to make a development board that could control a small - scale system.
Such as adjusting the speed of a motor or controlling a message display screen.
This experiment instantly ignited his DIY spirit. Since memory could be used to simulate basic logic, it was not impossible to use it to make a complete CPU.
Thus, the plan to handcraft a CPU was put on the agenda.
There are mainly four modules in handcrafting a CPU:
- Arithmetic Logic Unit (ALU): Responsible for performing arithmetic and logical operations.
- Memory Control Module: Used for data storage and address addressing.
- IO Interface and Program Storage Module: Provides the CPU with the ability to interact with the outside world.
- Control Module: Reads instructions and coordinates the previous three modules.
Although it sounds quite simple, the actual handcrafting process is another story.
Take the ALU for example. Designing it was a major challenge. At first, the ALU he made could only handle the simplest addition operations. In his own words, it was just a toy, and its performance was unreliable.
After continuous exploration, he decided to design the ALU as a fully - slotted type, which is mainly for convenient debugging. This is also a considerable advantage for handcrafting a CPU.
Moreover, MINT is a perfectionist during the process of handcrafting the CPU. If a module is not perfect, he will keep modifying it...
Of course, after the hardware design is completed, it's not over yet. There also needs to be a corresponding instruction set, which determines what the CPU can do later.
In this regard, MINT also started from scratch and wrote nearly 2000 lines of code to define how the CPU processes instructions and simplify the data transmission method in the system.
Compared with the capabilities of old - fashioned CPUs like the Z80, EPROMINT also supports multiplication, division, trigonometric operations, etc., which they don't have.
This is not all. A qualified CPU processor also needs to learn to handle interrupt tasks.
For example, if the CPU is playing "The Matrix" and suddenly a call comes in, the CPU has to stop and then continue playing after the call is finished.
When EPROMINT encounters an interrupt, it will light up the second LED light, then push the current program counter (PC) onto the stack. After other tasks are processed, it restores the data from the stack to continue the task.
Currently, EPROMINT is completely open - source. The circuit diagram, design documents, instruction set, etc. can all be obtained on GitHub. The link is at the end.
What's the Significance of Handcrafting a CPU?
MINT is not the first person to handcraft a CPU. A few years ago, there were videos on Bilibili by some up - owners about their handcrafted CPUs, which were quite popular.
But some people may still wonder why one would bother to handcraft a CPU from scratch when the technology for manufacturing CPUs is already quite mature.
To borrow a word from a netizen, "Perhaps this is the essence of DIY." Handcrafting a CPU from scratch doesn't hide all the execution paths under the silicon wafer like modern CPUs. Every clock cycle and all register changes are visible and traceable.
At the same time, to some extent, handcrafting a CPU can also promote the open - source hardware culture through in - depth practice.
Regardless of the performance of the handcrafted CPU in the end, the act itself is already worthy of admiration.
GitHub Address:
https://github.com/majsterkowanieinietylko/EPROMINT
This article is from the WeChat official account "Tech Fox" (ID: kejihutv). Author: Old Fox. Republished by 36Kr with permission.