Sunday, November 4, 2007


Homebrew computers. Some people like to build their own computers as a hobby. I don't mean buying subassemblies from computer stores and sticking them together in a case, I'm talking about building the actual boards, and designing and building CPUs from discrete chips. You can see dozens of CPUs and computers built out of TTL chips on the 'net. They have varying degrees of performance, but none can match a modern computer, of course. That's not the point. The point is building your own computer for fun and for learning stuff. One of these discrete TTL chip computers (designed and built by a guy who also did 'real' integrated CPUs as a job) runs Minix and is comparable in performance to an early 8086 PC. Others are notably less powerful, but as I said, that's not the point. The point is, it's a computer built from cheap, very low tech, off-the-shelf parts that have been widely available since the 1970s. I mean, in case of apocalypse, maybe ultra-high-tech semiconductor fabrication facilities may not be available anymore, but simple TTL chips can literally be fabricated in someone's basement with some little investment. Sure, they're slow, but who cares. We don't need luxury in order to survive. We need food, a roof and maybe a toilet. A flushing toilet would be a rare and highly prized item in such a scenario. Similarly, computers need not output high-definition DRM'ed video streams on wide screen monitors. Postapocalypse, we'd be OK with a command line on a mechanical teletype. Low-resolution graphics on some old rugged TV would again be considered luxury. And that would allow us to quickly redesign the old technology, if resources and politics allowed.
But even if this postapocalypse scenario is kind of stretched, there's still the cool factor, the DIY factor and the learning-all-by-yourself factor. So any criticism of this kind of endeavors is pointless. However, I mighs have some suggestions.
1. Why use 74LS chips? They're slow as hell. I mean sure, it works with 74LS but it also works with 74S which are much faster. Sure, they burn more gas, but who cares, it's a hobby not a mass-produced consumer item. Sure, they have to be laid out a little bit more carefully, but it can be done. Well, there are many reasons. First, as stated before, raw speed is not the ultimate goal, because you don't use these for actual 'work'. So yeah, one could say "I built it with 74LS because those are cheaper and more widely available, it works, it can theoretically be done with 74S but hell." and that's correct.
2. Why not PLDs? CPLDs? FPGAs? Because, that eliminates the physical work of making/wiring a lot of boards and soldering in the chips/sockets. Sure, it's faster to design, it runs much faster because it's all integrated in one chip, and that's why it's done this way in the industry. But this is hobby! :) Then, it's also harder to debug because you can't just put an oscilloscope or voltmeter anywhere in the circuit, it's integrated! There are ways to work around that, but it's less 'hands-on'. This being said, there are lots FPGA-based computers built by both amateurs and professionals. There are free soft-processors and peripherals that you can compile and download into FPGAs or even make into hard chips, on
3. Why not transistors? I mean, if you really want to DIY, and do it hands-on, so not inside an FPGA, why use TTL chips and not discrete transistors? That's cheating! :) Transistors are much easier to fabricate even than TTL chips, and there isn't any hardware that's lower-level. Sure, you can build a computer with relays, and for that you only need iron and wood, but that's to big to DIY in your house. Transistor boards would of course be much bigger and take much longer to build than equivalent TTL chip boards. So there's a point. But there's still no better way to wipe off the aura of 'black magic' that surrounds computer internals other than building one out of simple transistors. They have just two main terminals and a control terminal - no chips, no mysterious black boxes. And you could attach LEDs and see the bits flow.

So I'm officially launching a contest. Whoever can design a Brainfuck processor with the least number of transistors wins the respect of hardware hackers worldwide. Nobody cares about speed, area, or cost, it just needs to be Turing-complete. This is hobby. Also, nobody cares on how many bits you encode the instructions. They don't need to be ASCII, just have a 1-1 mapping to Brainfuck. Oh, and no scientific papers can be officially published on it, because it contains the word fuck. Thankfully.

No comments: