Implementation of the "Minesweeper" game using Handel-C language

Authors

  • Leonel Neves

Keywords:

Game, Minesweeper, Handel-C language, SSRAM

Abstract

This article describes an implementation of thewell-known Microsoft Windows game "Minesweeper", on the basis of the Celoxica RC100 board. The game runs in arich and colorful environment (16bpp), which is event drivenand organized as a window hierarchy, just like modern operating systems. At the beginning, the program copies bitmaps previously stored in the Flash RAM to the SSRAM block used as a databank. Then, the game structures are initialized. After that, several processes run in parallel: the video driver, the mouse driver, output to screen, mouse processing, random numbers generator, time counters, window manager and thegame it self. One of the SSRAM blocks is used exclusively as video RAM, thus providing a continuous feed of pixels to the VGA output. In a single clock cycle two pixels are fetched, which frees the following clock cycle, making it possible to write new datainto that RAM block.The mouse pointer is defined as an array of indexes to a 24bpp colormap and is enhanced by a mild and pleasant shadow, also defined as an array. Both pointer and shadoware kept in ROMs. This environment can be tailorcd to run any program forthe RC100 hardware without to much effort.

References

Published

2005-01-01

Issue

Section

Articles