I’ve not been around much and my hobby has taken a bit of a back seat as I’ve just been so busy with other things. However things seem to have calmed down for now and I’ve got some time to switch on the soldering iron.
Whilst sorting out my late brothers affects I stumbled across the plans for a tac-tac-toe (noughts and crosses) game that he designed and built in 1978. It was constructed entirely using CMOS logic chips (no CPU or MPU). I remember him working on this project all over Christmas and it being a bit of an anti-climax when it was completed; it’s not like you can ever win the game. According to his documentation, it required 188 logic gates spread over 66 separate ICs. It also needed 22 transistors and used LEDs for the square in use indicators and some push buttons allowing the human to enter their move. Unlike the version of the game referenced in the movie Wargames, the hardware emulation couldn’t play itself. The physical version of his game no longer exists. I remember playing it for 10 minutes or so and getting board. I do remember suggesting that the machine should wait a few seconds between moves to give the illusion it was thinking.
My gut feeling now is that it wasn’t really worth the effort, however it was a marvellous piece of electronics and engineering. Of course it could be replicated in just a few minutes using a PIC or other MPU and a few LEDs and push buttons.
As a programming exercise I’ve often written software to play this game when learning a new programming language or CPU/MPU platform, but I’ve never built one with just logic gates.
After studying his original plans it all just seemed overly complex to me. The rules of the game are of course pretty simple with no complex algorithms required and my brother chose to implement the game logic using lots of NOR and NAND gates. He could have done this with a Z80 or 6502 CPU (they were available) but it would have been expensive. It occurred to me that it would be really easy to build a physical version of this game using not much more than a clock, binary counter and some EEPROMS, which lead me to thinking that it could be possible to do this without ANY IC’s at all, using just DDL (Diode Diode Logic), though there some problems with this approach.
All the logic elements (gates) are constructed using small circuits based on diodes, but each diode causes a small voltage drop that needs to be overcome else after a voltage has passed though a couple of DDL gates, the voltage will be too low. Transistors would be the obvious solution but that goes against my pure DDL idea. There would be some research and experimentation required to see if I could get this approach to work, but since I’ve set my heart on building this game now, I’ve opted to build an intermediate version using just TTL and diodes.
My idea is to build something that would be familiar to anybody who has worked designing Microcode for CPUs.
There will be a master clock that will supply regular pulses to a counter. The output from the counter is decoded and selects a single row in a matrix. Each row in the matrix represents a rule and if the rule is true, a suitable course of action.
To keep things simple, my Microcode engine will not support branching. This means that the rule checking starts at the first entry, runs all the way to the last entry, and then just starts again from the start.
The game should allow for either the player or the machine to move first. It needs to check after each move to see if there is a winner or a draw, it needs to make sure the player cannot make an invalid move (cheat) and, if possible, I want the machine to be able to play itself. I will use coloured LEDs to indicate the owner of each of the nine game squares, LEDs will indicate who’s turn it is, and the game outcome. Nine push buttons will allow the human to enter their move and there will be a couple of other buttons allowing the human to setup the game.
First thing I need to do is experiment with constructing AND gates using only diodes. These diode gates needs to be able to interface with the TTL elements.
Leave a Reply
You must be logged in to post a comment.