KIM-1 is a single-board computer based on the 6502 microprocessor, which was popular in the late 1970s.
This project is a simple text-based trivia game that runs on the KIM-1. The program works with an LCD display through SPI and a keypad for user input.
See more information about this project here if you're interested.
project/: Contains the source code for the KIM-1 Trivia Game final projectLCD.asm: The program assembly code, I should've named it better, but it contains all the code that runs on the KIM-1.text_generation.py: A Python script that generates the in-memory data for the trivia questions and answers, which is uploaded to the KIM-1 before running the game.answers.txt: The answer file generated by thetext_generation.pywhich contains the trivia answers that can be directly uploaded to the KIM-1 through serial communication.questions.txt: The question file generated by thetext_generation.pywhich contains the trivia questions that can be directly uploaded to the KIM-1 through serial communication.LCD.hex: the actual file that is uploaded to the KIM-1, which contains the machine code generated fromLCD.asmafter assembling it with a 6502 assembler.LCD.lst: the listing file generated from assemblingLCD.asm, which contains the assembly code along with the corresponding machine code and memory addresses for reference.
samplePrograms/: Contains sample programs for the KIM-1, including programs I used for testing and experimenting.
To run the trivia game on the KIM-1, you will need to upload the LCD.hex file to the KIM-1 using a suitable method (e.g., through a serial connection). Make sure to also upload the questions.txt and answers.txt files to the KIM-1, as they contain the trivia questions and answers needed for the game to function properly.
- Compile the assembly code to hex using VASM:
vasm -Fihex -o LCD.hex LCD.asm-
After compiling the asm file to hex, open Tera Term, set the serial port to 1200 speed and 2 bit stop bits.
-
Switch to TTY mode on the KIM-1, press reset, and press enter in Tera Term. Once the connection is working, type capital 'L' then paste the hex file in.
-
In TTY mode of the KIM-1, in tera term we can type in the address (0200 for example), and type 'G', the program will run from that address. We can also run the program in KBD mode, in which we only need to run it on the KIM and the output will be shown.
-
PS: Don't forget to upload the
questions.txtandanswers.txtfiles to the KIM-1 as well (using the same method), as they are essential for the trivia game to function properly.