Now that I've finish the Kino 74, the little microcomputer I've been working on for the last year or so, I don't have any real lingering ongoing projects. I've done a painting recently, carved a few spoons, been brushing up on programming for the hopefully soon return to grad school, and a couple of other things. The painting took me about three days, the spoons take anywhere from a couple of days to a couple of weeks, and programming is a never-ending pursuit and I'll still never get as good as I'd like to be. Where I'm going with this is, I need a new project, and truthfully, I want it to be in the exact same vein as the Kino 74.
In trying to do some research about what it is that I'd like to do exactly, I've found some really cool projects that people have done. One especially has stood out to me as much for the approach as for how cool the project is. It's the politely titled "Brainfuck CPU" built by Alexis Bezverkhyy. You can read all about the project at http://grapsus.net/74/ and I'd highly recommend it.
To describe it briefly, the Brainfuck CPU is a CPU that implements off the “esoteric” Brainfuck programming language consisting of of only eight instructions, but is still capable of doing some real work such as drawing fractals or playing the game of life. I’ll let you dig in a bit more at his website for more specifics if you’re interested, but leave it here for my purposes. Seriously though: go read it.
The project was built as an entry to the 7400 competition put on by Dangerous Prototypes where competitors are charged with building a project out of 7400 series chips (out of which the Kino 74 is largely built) What really stood out to me was how precisely he laid out his goals and then used them to construct the project to enter. Here’s what he came up with:
- Use only modern, available and multi-sourced chips. So that everyone can reproduce it.
- Use as few circuits as possible. Let's say no more than 20. In that way, it will have an educational value.
- Be able to perform some real work, like draw a fractal or play a text-based game.
- Do it at reasonable speed. If a 2$ micro-controller can emulate my CPU faster than the real hardware, it isn't worth it.
He then breaks down the different, common options like building a CPU mimicking an old-school one such as the Z80 or the 8080 and explains why that has little value to him: too slow, too complex, has instructions no one really needs or uses, etc. Even saying things to the effects of “thus these projects fail at goals three and four.” As he traces through the specifics of what he wants to build, everything was informed by what he needed it to do, and then designed accordingly. How much ram he needed, how big the words needed to be etc. Harvard vs. Von Neumann architecture, CISC or RISC, big or little endian. Everything so precisely and carefully decided against how it stacked up to his goals. He simulated different options, wrote the code he wanted to run, and then built his prototype.
He won one of the first prizes for it and in my opinion clearly deserved to do so.
Despite being a (Brain)fucking awesome project, his methodology was so cool and I really admire it. It’s definitely the way I want to approach my next project. So precisely broken down into goals and ideas.
I think that my next project with be some sort of purpose built cryptographic device. I’m currently reading Cryptonomicon by Neal Stephenson and throughout the book the characters, particularly one of the ones in the 1940s (there are two concurrent story lines going, one during World War II and the other in the Nineties), encounter these purpose built crypto devices that have one purpose, such as deciphering a four wheel enigma or something like that.
Crypto is pretty fascinating subject that unfortunately I’ve never really trained and I’ve just dabbled in my free time. Such a project I think would allow me to design and implement something in hardware that we typically only do with CPUs nowadays. In fact, in Cryptonomicon, the 1940s character has just invented what is supposedly the first RAM in a step towards the first modern computer.
So the first goals of my project:
- Must be a useful beginning to learning crypto
- Must be of my own design. No making from someone else's schematics.
- Hardware implementation of whatever I choose to build (preferably with 7400-series chips) even if it could be done on a computer.
An auxiliary goal would be some sort of ability to drive a display and also some more simple way to read input in other than toggling switches in binary. An Arduino shield would be acceptable because I’d certainly learn something in the process of doing that. Finally, it’d be great if it were reasonably fast compared to modern technology, but that’s not critical for me the way it was for the Brainfuck CPU.
Anyways, I’ll keep digging and see if I can’ find something interesting to do with this idea.