Back to Home

KIM-1 Trivia Game

AssemblyPython

A Trivia game that runs on the KIM-1 6502-based computer, displayed by an LCD through SPI

I made this project in my freshman year as a first attempt in hardware computing. The idea is very simple: a text-based Trivia game that uses an LCD for output and buttons for input. What makes this project interesting is that it uses the 6502 microprocessor - very ancient tech used in the Apple II computer.

Demonstration

img img

Project Detail

The project consists of several components: hardware (KIM-1, LCD, circuit), software (python, assembly)

Hardware Material

  • Corsham Tech KIM-1 clone: this is a computer that has integrated the 6502 processor with a keyboard and some IO/hardware extension ports that allows us to program the computer with hexadecimal input for machine code - luckily we didn't have to use that feature for this program
  • 4*20 LCD screen NHD-0420D3Z-NSW-BBW-V3
  • Membrane 1x4 Keypad
  • Resistor 9X-1-103LF

Circuit Design

As a computer science student, I suck at circuit wiring and design compared to a regular EE or CompE kid, but simple diagrams should be enough for this little fun project. After about 5 minutes of drawing I came up with this: circuit img

Program

The main program was written in assembly code. To store the questions and answers in the computer, I wrote a Python script to generate the files that could be directly hardcoded in the memory, which would be referenced by our program.

The program loop is simple from the high level: display question, read input, check answer, and display results, repeat. However, programming Trivia in assembly was still a bit of a headache. There was no if else while, all I had was an instruction set and the schematics for the LCD and KIM-1. Setting up the IO and debugging hardware errors were the most challenging part. It was nevertheless a fun project, check it out here for more: Link