Joe's Hobby Electronics
  • Joe's Hobby Electronics
    • Electronics Blog

Tic-Tac-Toe

2/3/2020

0 Comments

 
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.
As a programming exercise I've often written software to play this game when learning a new programming language new 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). There are some problems though using just DDL.
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 thought 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 familier 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 whos 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 outer 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. I will also construct some of the major process blocks including the clock, sequence counter, reset and game end logic.

0 Comments

    Author

    A software and hardware engineer who loves retro computers.

    Archives

    March 2022
    September 2021
    April 2021
    June 2020
    May 2020
    April 2020
    March 2020
    September 2019
    January 2019
    April 2018
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    May 2015
    April 2015
    March 2015
    January 2015
    December 2014
    September 2014
    August 2014
    April 2014
    March 2014
    January 2014
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    April 2013
    March 2013
    January 2013
    September 2012
    June 2012
    May 2012
    April 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011

    Categories

    All
    18f25k20
    18F25K22
    1-wire
    2114
    2764
    3D Printer
    3D Printing
    74hc595
    74ls595
    86-0325
    8MHz
    Access Speed
    Acorn
    Acorn System 1
    Alarm
    Aluminium Panel
    Amicus
    Amicus18
    Amicus Basic
    Amplifier
    Antex 1107
    Anti-static Mat
    Arduino
    Assembler
    Backlight
    Bargains
    Basic
    Bat
    Batdetector
    Bat Detector
    Bats
    Bench Audio Amplifier
    Bench Light
    Breadboard
    Bubbler
    Buck
    Bug
    "C"
    Cable
    Cable Gauge
    Cable Wire Size
    Capacitors
    Catalogue
    Clive Maxfield
    Clock
    Clocks
    CMOS
    Common Emitter
    Compiled
    Compiler
    Connector
    CPU
    CPU Simulator
    Crownhill
    Custom Computer
    Custom CPU
    Damage
    Develop
    Diode
    Diptrace
    Double-sided
    Double-Sided PCB
    Dry-joint
    Ds1302
    DS1820
    Ds18b20
    Ebay
    EEPROM
    Electronics And Circuits
    Eprom
    Erase
    Etch
    Evaporator
    Failed Capacitor
    Fake
    Fax Paper
    Ferric Chloride
    Fire Hazzard
    Firmware
    Florescent Tube
    Health And Safety
    Hidden Part Numbers
    High-Voltage
    Hv
    IC Test Clip
    IC Testing
    In Circuit IC Testing
    Incubator
    INS8154
    Instruction Set
    Inverter
    Kickstarter
    Laser Cutter
    Lcd
    LM2596
    LM386
    Logic Analyser
    M7MOJ
    Maxim
    Maximum Current Rating
    Mega
    Mit
    MITx 6.002
    MK4
    Molex
    Mosfet
    NE555
    Nixie
    Nixie Clock
    Npn
    OXO
    Oxo Machine
    Pcb
    Pic
    Pic Basic
    Pickit2
    Pickit3
    Pic Programmer
    Pixy
    Poster
    Pre-amp
    Prices
    Programming
    Project Box
    Project Case
    Project Enclosure
    Propagation Delay
    Psu
    Psu Failure
    Qfn
    RAM
    Rapid Electronics
    Raspberry Pi
    Regulated 5v Psu
    Regulator
    Repair
    Review
    SAD (Segment Address Decoder)
    SCC
    SCC MK4
    Seven Segment Display
    Shift Register
    Silient 700
    Slow Progress
    Smoke
    Smps
    Soldering
    Speed
    Speed Test
    Stepper Motor
    Supression
    Swg
    Switch Box
    Tank
    Tantalum Capacitor
    Temperature
    Temperature Sensor
    Texas Instruments
    Thermometer
    Tic Tac Toe
    Tic-tac-toe
    Timer
    Tools
    Traffic Lights
    Transistor
    TTL
    Usb
    Uv
    Vbe
    Vcb
    Vce
    W65C02
    Wash
    Weller
    Wirecutters
    Wire Cutters
    Wire Strippers
    Wiring
    Wp3eu
    X2 Capacitor
    X Capacitor
    Y Capacitor

    RSS Feed

© Joe Farr, 2011 - 2022 - Email: HobbyElectronics@kcsl.uk.com