This Memory game was designed by Terry Luan and Shauda Islam. It was created for the DE1-SoC Computer
and was created using the CPUlator Computer System Simulator
- To run the Memory Game on the CPUlator Simulator, first go to https://cpulator.01xz.net/?sys=arm-de1soc.
- Change the Language from ARMv7 to C.
- Then copy and paste main.c into the main code window.
- Replace
#include global.h
and#include cards.h
with the contents of global.h and cards.h. - To play the game, you can press "Continue" on the top ribbon.
Everything important will be found in the right panel of the screen.
The important aspects of the game are listed below:
Push buttons : Difficulty Selection (0 for easy, 1 for medium, 2 for hard, 3 for impossible)
Seven-segment display : High Score/number of moves
VGA pixel buffer : Game board
PS/2 keyboard or mouse : Input box
Once you click continue, make a level/difficulty selection by clicking on the push button (it must be clicked on and off for the selection to be registered). The game should be loaded on the VGA buffer. From there, you can play by clicking into the input box! Flip the card by typing the number/letter into the input box, and match two cards of the same value.
Once all cards have been matched, the cards will reset and you can restart the game by selecting the same, or a different difficulty. Your score is based on amount of moves used. The high score is stored in the first 3 digits of the hex display, and your current score is stored in the last 3 digits of the hex display