Skip to content

SatireSage/FASTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Authors: Sahaj Singh, Bryce Leung

FASTrack Overview:

Reaction Time Based Game This game is written in ARM7 assembly instruction set for the Xilinx ZedBoard (The Zedboard is based on Zynq - 7000 EPP Development Kit)

FAS Track Documentation

Introduction:

FAS Track is a user reaction time game, where the users or users try to get their arrow onto the given finish mark. FAS Track utilizes the LEDs, switches, and OLED display on the ZedBoard. Written in the ARM7 assembly instruction set for the Xilinx ZedBoard, based on the Zynq – 7000 EPP development kit. Additionaly a few key concepts demonstrated through this project are timer interrupts, masking, oled display as well as FSMs.Through this document, you will gain a further understanding of how these components are utilized.

OLED Display:

Screen Shot 2022-08-06 at 4 37 33 AM

The OLED display is used for multiple display purposes for FAS Track. With the first row of the display displaying the current mode of the game and the other three rows being used as the play area. The first and third rows of the play area, are used to display moving arrows across the display. The movement of the arrows are done, using a printing function that increments the offset of the printing of the arrow that accounts for the end of the row. While the second row of the play area, is used to first print the dividing line between the two arrows. Additionally, it is used to display a randomly generated end point for the player or players to land on when a speed difficulty mode is running thus being in play.

LEDs:

The usage of LEDs for FAS Track is to indicate the switches that have been activated. When the game starts in base mode, the LEDs are active on the available switches that can be used.

Screen Shot 2022-08-06 at 4 36 41 AM

Screen Shot 2022-08-06 at 4 36 38 AM

LEDs At Base Mode Un-Flipped and LED Off When SW0 Is Flipped

When the player flips one of the available switches, the LEDs will represent the flip of the switch by turning off the LED of the switch below it.

Switches:

The use of switches within FAS Track is to control multiple aspects of the game.

Managing the difficulty speed of the game and being used as the input for the user or users to stop their arrow moving across the screen. Being detected through the utilization of masks, to identify the switch that has been flipped.

Below are the switches and their defined purpose as well as location on the board:

Switch Setup

Screen Shot 2022-08-06 at 4 32 29 AM

Switch Switches Purpose
SW 0: Setting the speed mode to easy
SW 1: Setting the speed mode to medium
SW 2: Setting the speed mode to hard
SW 3: Not In Use
SW 4: Not In Use
SW 5: Player 2 stops bottom arrow
SW 6: Not In Use
SW 7: Player 1 stops top arrow

When either one of the switches from SW 0 to SW 1 are utilized, the following behavior will be seen: Screen Shot 2022-08-06 at 4 33 27 AM

The Different Speed Modes Based On Switch Input

When either one or both of SW7 and SW 5 are utilized, associated arrows will pause printing on the OLED:

Screen Shot 2022-08-06 at 4 33 32 AM

Players Arrow Stopping Switches Activated

The usage of switches also considers the necessary order of which switches must be used. As shown in the diagram below, the different modes and states ensure that there are no unexpected effects from an erroneous flip of a switch.

Screen Shot 2022-08-06 at 4 35 01 AM

This behaviour can be seen in the following images, where either one or both users have chosen to stop their arrows. When the speed difficulty mode switches have been changed by accident, the game does not acknowledge the change as the users are still playing the game.

Screen Shot 2022-08-06 at 4 35 55 AM