AVR Assembly code for the Binario board project for EE 10b at Caltech
Binario is a puzzle game that might be likened to binary Soduku. The game is played on a square grid of even size, some positions of which are initially filled in with one of two distinct (and thus "binary") symbols. The objective of the game is to populate the entire grid with symbols such that
- No more than two of the same symbol aligned are present horizontally or vertically.
- Every row and column must contain the same number of each symbol.
- No two rows may be identical. No two columns may be identical.
This repository contains an AVR Studio 4 project comprising Assembly files for an implmentation of Binario on a custom ATmega64-based game board for the Introduction to Digital Logic and Embedded Systems (EE 10b) course at Caltech. The board allows the user to play Binario on an 8-by-8 red/green LED dot matrix. Eight different puzzles are available for play.
These instructions explain how to set up the Binario game:
- Make the board according to the schematic. A different AVR with at least 4 kB flash, 211 B SRAM, one 16-bit timer, and one 8-bit timer might be used instead of the ATmega64.
- For this project, AVR Studio 4.18 was used to develop the code.
- In AVR Studio, configure the ATmega64 to use an external high-speed oscillator and enable all system timers.
- Code may be uploaded with the JTAG ICE mode and a suitable programmer.
Upon powering on, the display will show a starburst animation, followed by a scrolling "Binario" message, and then another starburst animation. Then, a preset starting grid will be shown. The display flashes to indicate the game selection screen.
Scroll the left/right movement encoder to view the different puzzles available. Press the encoder to select the puzzle and start the game.
During gameplay, scroll the encoders to move the blinking cursor. Pressing the left/right movement encoder will change the color of the selected position, cycling from clear to red to green. The game will play a warning sound should one attempt to change the color of a preset position or fill in the grid incorrectly.
Once the correct solution has been entered, the screen will blink green while a short tune plays. Then the solution is displayed for viewing.
Pressing the up/down encoder switch at any time during gameplay resets the game to the game selection mode.
For more information, please refer to the functional specification.
- Ray Sun - Undergraduate, Electrical Engineering, Caltech, 2020
- Glen George designed the Binario game board as well as the starting animations.