Gameduino Tutorial
Gameduino Tutorial
Description:
Gameduino is a game adapter for Arduino (or anything else with an SPI
interface) built as a single shield that stacks up on top of the Arduino and has
plugs for a VGA monitor and stereo speakers. The sound and graphics are
definitely old-school, but thanks to the latest FPGA technology, the sprite
capabilities are a step above those in machines from the past. The adapter is
controlled via SPI read/write operations, and looks to the CPU like a 32Kbyte
RAM. (Unlike many 8-bit machines, there are no restrictions on when you can
access this RAM). There is even a handy reference poster (which you can
download below) showing how the whole system works.
Features:
1 / 12
• Foreground Graphics
o each sprite is 16x16 pixels with per-pixel transparency
o each sprite can use 256, 16 or 4 colors
o four-way rotate and flip
o 96 sprites per scan-line, 1536 texels per line
o pixel-perfect sprite collision detection
• Audio output is a stereo 12-bit frequency synthesizer
• 64 Independent Voices 10-8000 Hz
• Per-Voice Sine Wave or White Noise
• Sample Playback Channel
Physical Connection:
:
Gameduino is the standard Arduino module. Arduino pins which have to be connected to it
are as following picture shows:
2 / 12
Gameduino is superimposed on top of Arduino directly.
:
FPGA Verilog codes http://excamera.com/files/gameduino/verilog/
Composite these codes through the ISE. Program them. Then, the executable bit file can
be generated.
3 / 12
Double click PROM File Formatter ,
Choose Configure Single FPGA in the SPI Flash of the Storage Device Type. Click
Gameduino’s Flash capacity is 4M. Click Add Storage Device and click
4 / 12
Click OK. Add .bit file.
Comes, means the .mcs file which has to be burnt into SPIflash is generated successfully.
Double click Boundary Scan ,and then click . Choose .bit file and following dialogue
comes out:
5 / 12
,
Click Yes choose.mcs file and following dialogue comes out.
,
Choose FLASH program ,
Burn the codes into SPI FLASH successfully.
:
1.Add the library files into Arduino
Zip the download library files and generate the folder: gameduino. Put this folder
into libraries under the Arduino installation directory. Open the Arduino software. Sample
codes are in File > Examples > Gameduino.
6 / 12
,
2. Choose one example such as chessboard and upload into Arduino. You can see the
following picture on the displayer.
7 / 12
Usage of the joystick:
:
8 / 12
GND singal GND
5V VCC
ANALOG 0 x_position
ANALOG 1 y_position
DIGITAL 2 BUTTON_SELECT
DIGITAL 3 BUTTON_RIGHT
DIGITAL 4 BUTTON_UP
DIGITAL 5 BUTTON_DOWN
DIGITAL 6 BUTTON_LEFT
Joystick testing :
9 / 12
File > Examples > Gameduino> Tools > joytest.
Upload
10 / 12
Upload
12 / 12