terça-feira, 1 de setembro de 2015

PIC32 Tetris Game and Graphic Display 240x320 TouchScreen



This is my project of the Tetris Game with PIC32MX and Graphic Display 240x320 QVGA TouchScreen.





Resources:

- standard Tetris pieces: O, I, S, Z, L, J and T;
- standard Tetris board: 20 lines x 10 columns;
- command Pause;
- selection for Initial Level;
- color or monochrome block;
- game record storage in external memory Flash SST25;
- standard Tetris falling iteration delay: 0.5 sec - 0.05 sec;
- standard Tetris score;
- 10 difficulty Levels;
- randomizes pieces with Timer4 (not used random function of the C Language).


 Figure 1 - Tetris Game with PIC32MX.



Hardware:
 - PIC32 USB Starter Kit II;
- I/O Expansion Board;
- GFXv3 SSD1926 LCD Graphic Controller;
- Graphic Display Solomon Systeck 240x320 with TouchScreen.


Figure 2 - The PIC32MX USB Starter Kit II.

Figure 3 - Circuit block diagram.


Figure 4 - PIC32 Starter kit Boards.



Figure 5 - Graphic Display 240x320 TouchScreen.


Software:
- MPLAB IDE v8.83;
- MPLAB C32 v2.02.

Firmware:
- MLA v2013-06-15;
- Graphics Library 3.06.04.


Figure 6 - Init screen.


Figure 7 - The PIC32MX Tetris Game.



Figure 8 - Color screen.


Figure 9 - Monochrome.


Figure 10 - Game Over!



This is the video of my project of the Tetris Game with PIC32MX and Graphic Display 240x320 QVGA TouchScreen.

Video - PIC32MX Tetris Game and Graphic Display QVGA TouchScreen.


Alexey Pajitnov created the first electronic version of Tetris in 1985 in Russia!


Special thanks to Colin Fahey for providing information, settings and examples codes of standard Tetris game on virtual gallery - website "The History of Tetris"!




References:



FAHEY, Colin. Standard Tetris. History of Tetris. Tetris A.I. system. 2003-2012. Available in: http://colinfahey.com/tetris/tetris.html.

MORAES, Ivan. Tetris Borland Turbo C. 2003. Available in:  http://www.linhadecodigo.com.br/codigo.aspx?id=382

GUNEE, Rickard. PIC-Tetris. PIC16F84 microcontroller-based NTSC / PAL video Tetris game.  1998. Available in:  http://www.rickard.gunee.com/projects/video/pic/tetris.php

MITCHELL, Graham. PICtris. Tetris on a PIC (18LF4520) Microcontroller. 64 LED matrix. 2010. Available in: http://digitaldiy.io/home/swordfish/projects/213-tetris-on-a-pic.html#.VZXwhFIxrkc

HENDRICH. PIC16F628 Tetris for Terminals game. 2006. Available in: https://tams.informatik.uni-hamburg.de/applets/hades/webdemos/95-dpi/pic16f628-tetris/tetris.html

MICROCHIP. Software Libraries. Available in: http://www.microchip.com/SoftwareLib.aspx

MICROCHIP. Microchip Graphics Library. Available in: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en543091&utm_source=MicroSolutions&utm_content=AIPD&utm_campaign=Graphics+Library